Float class.
More...
#include <minitscript/utilities/Float.h>
|
static bool | is (const string &str) |
| Check if given string is a float string. More...
|
|
static bool | viewIs (const string_view &str) |
| Check if given string is a float string. More...
|
|
static float | parse (const string &str) |
| Parse float. More...
|
|
static float | viewParse (const string_view &str) |
| Parse float. More...
|
|
static bool | isNaN (float value) |
| Check if float is not a number. More...
|
|
static bool | isInfinite (float value) |
| Check if float is infinite. More...
|
|
static bool | isFinite (float value) |
| Check if float is infinite. More...
|
|
static float | interpolateLinear (float a, float b, float t) |
| Interpolates between a and b by 0f<=t<=1f linearly. More...
|
|
static bool | equals (float f1, float f2) |
|
|
static constexpr float | MAX_VALUE { numeric_limits<float>::max() } |
|
static constexpr float | MIN_VALUE { -numeric_limits<float>::max() } |
|
static constexpr float | NAN_VALUE { numeric_limits<float>::quiet_NaN() } |
|
Float class.
- Author
- Andreas Drewke
Definition at line 23 of file Float.h.
◆ is()
bool is |
( |
const string & |
str | ) |
|
|
static |
Check if given string is a float string.
- Parameters
-
- Returns
- given string is float
Definition at line 26 of file Float.cpp.
◆ viewIs()
bool viewIs |
( |
const string_view & |
str | ) |
|
|
static |
Check if given string is a float string.
- Parameters
-
- Returns
- given string is float
Definition at line 39 of file Float.cpp.
◆ parse()
float parse |
( |
const string & |
str | ) |
|
|
static |
Parse float.
- Parameters
-
- Returns
- float
Definition at line 53 of file Float.cpp.
◆ viewParse()
float viewParse |
( |
const string_view & |
str | ) |
|
|
static |
Parse float.
- Parameters
-
- Returns
- float
Definition at line 70 of file Float.cpp.
◆ isNaN()
static bool isNaN |
( |
float |
value | ) |
|
|
inlinestatic |
Check if float is not a number.
- Parameters
-
- Returns
- if value is not a number
Definition at line 63 of file Float.h.
◆ isInfinite()
static bool isInfinite |
( |
float |
value | ) |
|
|
inlinestatic |
Check if float is infinite.
- Parameters
-
- Returns
- if value is infinite
Definition at line 72 of file Float.h.
◆ isFinite()
static bool isFinite |
( |
float |
value | ) |
|
|
inlinestatic |
Check if float is infinite.
- Parameters
-
- Returns
- if value is finite
Definition at line 81 of file Float.h.
◆ interpolateLinear()
static float interpolateLinear |
( |
float |
a, |
|
|
float |
b, |
|
|
float |
t |
|
) |
| |
|
inlinestatic |
Interpolates between a and b by 0f<=t<=1f linearly.
- Parameters
-
- Returns
- interpolated float value
Definition at line 92 of file Float.h.
◆ equals()
static bool equals |
( |
float |
f1, |
|
|
float |
f2 |
|
) |
| |
|
inlinestatic |
- Returns
- f1 and f2 are equals
Definition at line 99 of file Float.h.
◆ MAX_VALUE
constexpr float MAX_VALUE { numeric_limits<float>::max() } |
|
staticconstexpr |
◆ MIN_VALUE
constexpr float MIN_VALUE { -numeric_limits<float>::max() } |
|
staticconstexpr |
◆ NAN_VALUE
constexpr float NAN_VALUE { numeric_limits<float>::quiet_NaN() } |
|
staticconstexpr |
The documentation for this class was generated from the following files:
- /home/andreas/Development/drewke.net/minitscript/src/minitscript/utilities/Float.h
- /home/andreas/Development/drewke.net/minitscript/src/minitscript/utilities/Float.cpp