Type: double - Paramecium13/LSN GitHub Wiki
The double type represents a 64-bit floating point number. It supports all the arithmetic operations, but does not currently support bitwise operations.
Operations
All of these operations produce a double as their result.
- Addition: Adds two doubles. Uses the '+' symbol.
- Subtraction: Subtracts one double from another. Uses the '-' symbol.
- Multiplication: Multiplies two doubles.Uses the '*' symbol.
- Division: Divides one double by another, producing an integer and ignoring any remainder. Uses the '/' symbol.
- Modulo: Calculates the remainder of dividing one double by another. Uses the '%' symbol.
- Exponentiation: Raises one double to the power of another double. Uses the '^' symbol.
The double type also supports all the above operations that operate on a double and an int and result in a double. It also supports the standard comparison operations, which result in a boolean. The comparison operations can also be used with a double and an int.
Methods
- Abs: Returns the absolute value.
- Ceil: Returns the value rounded up to the nearest integer.
- Floor: Returns the value rounded down to the nearest integer.