Pelago
Core typesmath

Constants

math.pi, math.tau and math.e: their values and type.

NameValue
math.pi3.141592653589793
math.tau6.283185307179586, that is 2 * pi
math.e2.718281828459045

All three are float constants.

fn main() {
    print(math.pi, math.tau, math.e)
    const r = 2.0
    print(math.pi * r * r)
}
3.141592653589793 6.283185307179586 2.718281828459045
12.566370614359172

On this page