vyre-std 0.1.0

Vyre standard library: GPU DFA assembly pipeline, Aho-Corasick construction, and compositional arithmetic helpers
Documentation
///   [`crate::arith::clamp_u32`] / their own bound.
/// - Precision at the endpoints is not guaranteed to be exact: for very
///   large `a` or `b`, catastrophic cancellation in `b - a` can lose
///   bits. The algebraic form `a + (b - a) * t` is chosen for
///   monotonicity, not for bitwise endpoint accuracy.
///
/// Does not panic.
#[must_use]
#[inline]
pub fn lerp_f32(a: f32, b: f32, t: f32) -> f32 {
    a + (b - a) * t
}

/// Linear interpolation for `f64`.
///
/// # Edge cases
/// Same IEEE-754 semantics as [`lerp_f32`]: NaN propagates, infinities
/// follow standard arithmetic, `t` outside `[0, 1]` extrapolates. Does
/// not panic.
#[must_use]
#[inline]
pub fn lerp_f64(a: f64, b: f64, t: f64) -> f64 {
    a + (b - a) * t
}