10 #include <string_view>
16 using std::numeric_limits;
18 using std::string_view;
29 static constexpr
float MAX_VALUE { numeric_limits<float>::max() };
30 static constexpr
float MIN_VALUE { -numeric_limits<float>::max() };
31 static constexpr
float NAN_VALUE { numeric_limits<float>::quiet_NaN() };
38 static bool is(
const string& str);
45 static bool viewIs(
const string_view& str);
52 static float parse(
const string& str);
59 static float viewParse(
const string_view& str);
66 inline static bool isNaN(
float value) {
85 return isfinite(value);
96 return (b * t) + ((1.0f - t) * a);
102 inline static bool equals(
float f1,
float f2) {
103 return Math::abs(f2 - f1) < Math::EPSILON;
static bool isFinite(float value)
Check if float is infinite.
static bool viewIs(const string_view &str)
Check if given string is a float string.
static float interpolateLinear(float a, float b, float t)
Interpolates between a and b by 0f<=t<=1f linearly.
static bool isInfinite(float value)
Check if float is infinite.
static constexpr float MAX_VALUE
static float viewParse(const string_view &str)
Parse float.
static float parse(const string &str)
Parse float.
static constexpr float NAN_VALUE
static bool equals(float f1, float f2)
static constexpr float MIN_VALUE
static bool isNaN(float value)
Check if float is not a number.
static bool is(const string &str)
Check if given string is a float string.