Float
32-bit floating-point number.
xxml
Language::CoreMethods
| Method | Parameters | Returns | Description |
|---|---|---|---|
| Constructor | — | Float^ | Create Float (0.0) |
| Constructor | value: float | Float^ | Create from literal |
| add | other: Float^ | Float^ | Addition |
| subtract | other: Float^ | Float^ | Subtraction |
| multiply | other: Float^ | Float^ | Multiplication |
| divide | other: Float^ | Float^ | Division |
| equals | other: Float^ | Bool^ | Equality check |
| lessThan | other: Float^ | Bool^ | Less than |
| greaterThan | other: Float^ | Bool^ | Greater than |
| toString | — | String^ | Convert to string |
| toInteger | — | Integer^ | Truncate to Integer |
| toDouble | — | Double^ | Convert to Double |
Examples
Float Operations
xxml
Instantiate Float^ As <pi> = Float::Constructor(3.14159f);
Instantiate Float^ As <radius> = Float::Constructor(2.5f);
Instantiate Float^ As <area> = pi.multiply(radius).multiply(radius);