{
"import": [
"mizchi/js",
"mizchi/js/builtins/math"
]
}fn main {
// Basic operations
let abs_val = @math.abs(-5.5) // 5.5
let rounded = @math.round(3.7) // 4.0
let power = @math.pow(2.0, 3.0) // 8.0
// Trigonometry
let sine = @math.sin(0.0) // 0.0
let cosine = @math.cos(0.0) // 1.0
// Random
let random = @math.random() // 0.0 <= x < 1.0
// Constants
let pi = @math.PI
let e = @math.E
}#external
pub type Mathjs bindings for builtins/web/node/deno/bun (browser APIs split to mizchi/js_browser)
Dependencies