|
Plutonium framework API 1.0.0
Easy-to-use, SDL2-based UI framework for Nintendo Switch homebrew
|
Type used to vary a value, from an initial value to a final one, following the shape of a sigmoid function. More...
#include <ui_Types.hpp>
Public Member Functions | |
| constexpr | SigmoidIncrementer () |
| Creates a new SigmoidIncrementer with all values reset. | |
| void | Start (const u32 f_steps, const T target_initial_val, const T target_incr) |
| Starts the incrementation process from an initial value to a final one, with a specified number of steps. | |
| void | StartFromZero (const u32 f_steps, const T target_final_val) |
| Starts the incrementation process from 0 to a final value, with a specified number of steps. | |
| void | StartToZero (const u32 f_steps, const T target_initial_val) |
| Starts the incrementation process from an initial value to 0, with a specified number of steps. | |
| bool | Increment (T &target) |
| Increments the target value (performs a step in the incrementation process). | |
| bool | IsDone () |
| Checks whether the incrementation process has finished. | |
Static Public Attributes | |
| static constexpr double | AllowedError = 0.4f |
| Allowed error for the initial/final point reach precision. | |
Type used to vary a value, from an initial value to a final one, following the shape of a sigmoid function.
| T | Type of the value to vary. |
|
inlineconstexpr |
Creates a new SigmoidIncrementer with all values reset.
|
inline |
Increments the target value (performs a step in the incrementation process).
| target | Output variable where the current value will be stored. |
|
inline |
Checks whether the incrementation process has finished.
|
inline |
Starts the incrementation process from an initial value to a final one, with a specified number of steps.
| f_steps | Number of steps to reach the final value. |
| target_initial_val | Initial value. |
| target_incr | Final increment from the initial value (final value - initial value). |
|
inline |
Starts the incrementation process from 0 to a final value, with a specified number of steps.
| f_steps | Number of steps to reach the final value. |
| target_final_val | Final value. |
|
inline |
Starts the incrementation process from an initial value to 0, with a specified number of steps.
| f_steps | Number of steps to reach the final value. |
| target_initial_val | Initial value. |
|
staticconstexpr |
Allowed error for the initial/final point reach precision.