|
proto external string | ToString (int len=-1, int lenDec=-1) |
| Float to string with fixed length, padded with zeroes.
|
|
proto external int | Sign () |
| Returns an integer that indicates the sign of a number.
|
|
|
static proto bool | AlmostEqual (float a, float b, float epsilon=0.0001) |
| Return true when difference of two given float values is less or equal then epsilon.
|
|
◆ AlmostEqual()
Return true when difference of two given float values is less or equal then epsilon.
float a = 1.0;
float b = 1.001;
Print(
"are almost equal");
>> 'are almost equal'
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
static proto bool AlmostEqual(float a, float b, float epsilon=0.0001)
Return true when difference of two given float values is less or equal then epsilon.
◆ Sign()
proto external int float.Sign |
( |
| ) |
|
Returns an integer that indicates the sign of a number.
- For
floatNumber.Sign() < 0
result is -1.
- For
floatNumber.Sign() == 0
result is 0.
- For
floatNumber.Sign() > 0
result is 1.
◆ ToString()
proto external string float.ToString |
( |
int |
len = -1 , |
|
|
int |
lenDec = -1 |
|
) |
| |
Float to string with fixed length, padded with zeroes.
- Parameters
-
len | int fixed length (overall including decimal part and floating point mark) |
lenDec | int fixed length of decimal part float num = 123.456;
>> s1 = '00123.4560'
>> s2 = '123.456'
proto external string ToString(int len=-1, int lenDec=-1) Float to string with fixed length, padded with zeroes.
|
◆ INFINITY
const float float.INFINITY = FLT_INF |
|
static |
◆ MAX
const float float.MAX = FLT_MAX |
|
static |
The documentation for this interface was generated from the following file:
- Core/generated/Types/float.c