OxL Reference

type i64

impl i64

Since. 1.0.0-beta

Methods

checked_add(o: i64) -> i64?
Checked addition
checked_sub(o: i64) -> i64?
Checked subtraction
checked_mul(o: i64) -> i64?
Checked multiplication
checked_div(o: i64) -> i64?
Checked division (truncating toward zero)
checked_rem(o: i64) -> i64?
Checked remainder
wrapping_add(o: i64) -> i64
Addition that wraps around at the bounds of the type (two's complement) instead of panicking.
wrapping_sub(o: i64) -> i64
Subtraction that wraps around at the bounds of the type instead of panicking.
wrapping_mul(o: i64) -> i64
Multiplication that wraps around at the bounds of the type instead of panicking.
saturating_add(o: i64) -> i64
Addition that stops at the nearest bound of the type instead of panicking.
saturating_sub(o: i64) -> i64
Subtraction that stops at the nearest bound of the type instead of panicking.
saturating_mul(o: i64) -> i64
Multiplication that stops at the nearest bound of the type instead of panicking.
wrap() -> U
x.wrap<U>(): converts to the numeric type U; an integer that does not fit wraps around (keeps the low bits), a float is truncated toward zero (§3.1).
try() -> U | OutOfRange
x.try<U>(): checked conversion to the numeric type U (§3.1).
abs() -> i64
The absolute value.
signum() -> i64
-1, 0 or 1 for a negative, zero or positive value.
min(o: i64) -> i64
The smaller of the two values.
max(o: i64) -> i64
The larger of the two values.
clamp(lo: i64, hi: i64) -> i64
lo when the value is below it, hi when it is above, the value itself otherwise.
pow(e: u32) -> i64
Power by repeated squaring; panics on overflow like *.
toString() -> str
The decimal text of the value (what interpolation {x} shows).

Defined in: std/core/numbers.oxl:5

See also