MCPcopy Create free account
hub / github.com/PerroEngine/Perro / remap

Function remap

perro_source/api_modules/perro_modules/src/math.rs:145–148  ·  view source on GitHub ↗
(in_min: f32, in_max: f32, out_min: f32, out_max: f32, value: f32)

Source from the content-addressed store, hash-verified

143
144#[inline]
145pub fn remap(in_min: f32, in_max: f32, out_min: f32, out_max: f32, value: f32) -> f32 {
146 let t = ilerp_core(in_min, in_max, value);
147 lerp_core(out_min, out_max, t)
148}
149
150#[inline]
151pub fn smoothstep(edge0: f32, edge1: f32, value: f32) -> f32 {

Callers 2

Calls 2

ilerp_coreFunction · 0.85
lerp_coreFunction · 0.85

Tested by 2