polydat 0.1.0

Polydat — generation kernel for deterministic variate generation in nb-rs (formerly nbrs-variates)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// math_trig.gk — Math and trigonometry functions.
//
// Exercises sin, cos, sqrt, exp, ln, lerp, scale_range, clamp_f64.
// All operate on f64 values derived from unit_interval.

input cycle: u64
h := hash(cycle)
u := unit_interval(h)
sine := sin(u)
cosine := cos(u)
root := sqrt(u)
exponential := exp(u)
scaled := scale_range(h, -100.0, 100.0)
interpolated := lerp(u, 0.0, 1000.0)
clamped := clamp_f64(scaled, -50.0, 50.0)