|
Smolgui
Immediate gui library based on SFML
|
#include <cmath>#include <string>#include <cstdint>#include <type_traits>#include "sgui/Core/Interpolation.tpp"Go to the source code of this file.
Namespaces | |
| namespace | sf |
| namespace | sgui |
Functions | |
| template<typename Type> | |
| constexpr sf::Vector2< Type > | sgui::round (const sf::Vector2< Type > &value) |
| Round sf::Vector2 components. | |
| template<typename Type> | |
| constexpr sf::Vector2< Type > | sgui::round (const sf::Vector3< Type > &value) |
| Round sf::Vector3 components. | |
| template<typename Type> | |
| constexpr Type | sgui::lerp (const Type &min, const Type &max, const float value) |
| Linear interpolation between min and max if value belong to [0, 1], with extrapolation otherwise (see clampedLerp). | |
| sf::Color | sgui::lerp (const sf::Color &a, const sf::Color &b, const float value) |
| Interpolate between two color, value is clamped to [0, 1]. | |
| template<typename Type> | |
| constexpr Type | sgui::clamp (const Type min, const Type max, const Type value) |
| Clamp value between min and max. | |
| template<typename Type> | |
| constexpr Type | sgui::clampedLerp (const Type &min, const Type &max, const float value) |
| Clamped linear interpolation, it always return a value in [min, max] regardless of if value is in [0, 1] or not. | |
| template<typename Type> | |
| constexpr float | sgui::inverseLerp (const Type &min, const Type &max, const Type &value) |
| Inverse linear interpolation. Return in [0, 1] range if value is in [min, max]. | |
| template<typename InputType, typename OutputType> | |
| constexpr OutputType | sgui::remap (const InputType &minInput, const InputType &maxInput, const OutputType &minOutput, const OutputType &maxOutput, const InputType &value) |
| Remap a value from [minInput, maxInput] range to [minOutput, maxOutput], depending on where value is in [minInput, maxInput]. | |