Module std/int.vv
The int module provides standard utilities for integer numbers.
Example:
import int from "std/int.vv"
let s = int.to_string(42) // "42"
let a = int.abs(-5) // 5
Exports
fun to_string(i)
extern "native"
Converts an integer to its string representation.
Example:
let s = int.to_string(42) // "42"
fun abs(n)
extern "native"
Returns the absolute value of n.
Example:
let a = int.abs(-5) // 5
let b = int.abs(5) // 5
fun min(a, b)
extern "native"
Returns the smaller of a and b.
Example:
let m = int.min(10, 5) // 5
fun max(a, b)
extern "native"
Returns the larger of a and b.
Example:
let m = int.max(10, 5) // 10