Skip to content

float Type

Represents a single precision (32-bit) floatiang point number.

  • A floating-point number is one which has a decimal component (e.g. 1.01)
  • Members of this DataType generally manipulate the number's precision (i.e. how many decimal places)
  • They all round correctly with the exception of int

Members

string Centi

The number as a string with two places of precision, i.e. ###.##

string Deci

The number as a string with one place of precision, i.e. ###.#

int Int

Integer portion of the number truncated rather than rounded, e.g. 12.779 returns 12

string Milli

The number as a string with three places of precision, i.e. ###.###

string Precision[#]

The number as a string with # places of precision

string Prettify[precision]

Pretty print the number with commas, with optional precision (defaults to two decimal points).

int Raw

Returns IEEE 754 representation of floating point value.

string To String

Same as Centi

Discussions that link here

This datatype is added by MacroQuest.