Numerics
GEB
uses different numbers representing various levels of precision.
Type | Precision |
| 1E-18 |
| 1E-27 |
| 1E-45 |
You can import them from pyflex:
Converting Wad
, Ray
, Rad
to a str
shows the numbers in a friendly format:
Constructors will add a specific precision to a number eg. Wad(1)
is not equal to 1
but to 10^18.
Operations: Addition, Subtraction, Division
Wad
, Ray
, and Rad
can only perform addition, subtraction and division with another Wad
, Ray
, or Rad
Operations: Multiplication
Wad
, Ray
, and Rad
can be multiplied by any Wad
, Ray
, and Rad
and int
.
The result is the type of the first number:
Conversion
Wad
, Ray
, and Rad
all accept Wad
, Ray
, and Rad
in the constructors. This is the canonical way to convert numbers:
During conversion (Rad
to Ray
/Wad
or Ray
to Wad
) you may lose precision!
Last updated