Rho Rho language and toolchain

std.math.basic

The module module std.math.basic, read from deploy/std/math/basic.rho. This page is generated from the source, so it describes what the code declares.

Functions

abs_i32()

fn abs_i32(x: i32) i32

clamp_f64()

fn clamp_f64(x: f64, lo: f64, hi: f64) f64

clamp_u32()

fn clamp_u32(x: u32, lo: u32, hi: u32) u32

deadband_f64()

fn deadband_f64(x: f64, threshold: f64) f64

map_f64()

fn map_f64(x: f64, in_min: f64, in_max: f64, out_min: f64, out_max: f64) f64

max_f64()

fn max_f64(a: f64, b: f64) f64

max_u32()

fn max_u32(a: u32, b: u32) u32

min_f64()

fn min_f64(a: f64, b: f64) f64

min_u32()

fn min_u32(a: u32, b: u32) u32

smoothstep()

fn smoothstep(edge0: f64, edge1: f64, x: f64) f64