Provides a class for smooth value transitions using a ramp filter.
static bool IsClose(float v1, float v2, float epsilon)
Checks if two values are close within a specified epsilon.
void SetIncrement(float increment)
Sets the increment for each transition step.
float epsilon
A small tolerance to determine when to stop adjusting.
float Filter(float value)
Applies the ramp filter to the specified target value.
float filter
The current filtered value.
float increment
The step size for each frame of the transition.
RampFilter()
Default constructor for RampFilter.
void SetFrames(int frames)
Sets the number of frames for a complete transition.