MinitScript  0.9.31 PRE-BETA
Static Public Member Functions | Static Public Attributes | List of all members
Float Class Referencefinal

Float class. More...

#include <minitscript/utilities/Float.h>

Collaboration diagram for Float:
Collaboration graph

Static Public Member Functions

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 Public Attributes

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() }
 

Detailed Description

Float class.

Author
Andreas Drewke

Definition at line 23 of file Float.h.

Member Function Documentation

◆ is()

bool is ( const string &  str)
static

Check if given string is a float string.

Parameters
strstring
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
strstring
Returns
given string is float

Definition at line 39 of file Float.cpp.

◆ parse()

float parse ( const string &  str)
static

Parse float.

Parameters
strstring
Returns
float

Definition at line 53 of file Float.cpp.

◆ viewParse()

float viewParse ( const string_view &  str)
static

Parse float.

Parameters
strstring
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
valuefloat value
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
valuefloat value
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
valuefloat value
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
afloat a
bfloat b
tt
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.

Member Data Documentation

◆ MAX_VALUE

constexpr float MAX_VALUE { numeric_limits<float>::max() }
staticconstexpr

Definition at line 26 of file Float.h.

◆ MIN_VALUE

constexpr float MIN_VALUE { -numeric_limits<float>::max() }
staticconstexpr

Definition at line 27 of file Float.h.

◆ NAN_VALUE

constexpr float NAN_VALUE { numeric_limits<float>::quiet_NaN() }
staticconstexpr

Definition at line 28 of file Float.h.


The documentation for this class was generated from the following files: