Function normalize_fixed32

Source
pub fn normalize_fixed32(
    value: I32F32,
    min: I32F32,
    max: I32F32,
) -> Option<I32F32>
Expand description

Generalized method to normalize a value within a given range.

§Arguments

  • value: The value to normalize.
  • min: The minimum value of the range.
  • max: The maximum value of the range.

§Returns

  • A Some(I32F32) representing the normalized value in the range [0.0, 1.0].
  • Returns None if min and max are effectively the same (to prevent division by zero).