F32.lerp: def of Base Import: import Base Lines 1847-1854 of Base/base.bend: https://jend.leeeet.dev/read.txt?path=Base/base.bend&start_line=1847&end_line=1854 import Base # At t = 0 and t = 1 return that endpoint as is, keeping signed zero and never # multiplying the other one (an infinite endpoint would give NaN). Between them # the weighted sum avoids overflowing b - a for finite endpoints of opposite # signs. def F32.lerp(a: F32, b: F32, t: F32) -> F32: match t: case F32{+z}: F32.lerp.zero(a, b, F32{z}, F32.is_eq(F32{z}, 0.0)) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.lerp.zero