The Float object is used to store and manipulate a float number.
As Integer and String objects, the Float object cannot be instanciated, see Seccia language documentation for further details.
Functions
| Add | Adds a value to the number. |
|---|---|
| AddOne | Adds 1.0 to the number. |
| Div | Divides the number by a value. |
| Get | Returns the stored value. |
| GetInt | Returns the stored value without the decimal part. |
| GetObjectRef | Retrieves the inner Seccia reference of the object. |
| Mod | Calculates a modulo with another number. |
| Mult | Multiplies the number by a value. |
| Pow | Takes the number to a specified power. |
| Round | Rounds the float value without changing the stored value. |
| Set | Changes the stored value. |
| Sub | Subtracts a value to the number. |
| SubOne | Subtracts 1.0 to the number. |
Events
The Float object has no events.
Constants
The Float object has no constants.
Example
// Create a Float named myFloat
Float myFloat
// Set myFloat value to 10.0
myFloat = 10.0
// Display myFloat value in a message box
MessageBox("Current value: " + myFloat)
// Add 5.2 to myFloat
myFloat.Add(5.2)
// Display myFloat value in a message box
MessageBox("Current value: " + myFloat)
Float myFloat
// Set myFloat value to 10.0
myFloat = 10.0
// Display myFloat value in a message box
MessageBox("Current value: " + myFloat)
// Add 5.2 to myFloat
myFloat.Add(5.2)
// Display myFloat value in a message box
MessageBox("Current value: " + myFloat)