Skip to main content

splash_floor

Function splash_floor 

Source
pub fn splash_floor(x: f64) -> i32
Expand description

Re-export every public type from the color crate, including all arithmetic helpers from color::convert.

Downstream modules within this crate can import everything they need with a single use crate::types::*. Floor toward −∞, returning i32.

Equivalent to C++ splashFloor — matches the portable fallback path.

§Valid input range

Any f64. For PDF coordinates, values are always finite and well within i32 range.

§Edge cases

  • Finite values outside [i32::MIN, i32::MAX]: saturate to i32::MIN or i32::MAX respectively.
  • NaN or ±infinity: is_finite() check returns i32::MIN for any non-finite input (conservatively safe — callers must not rely on this specific value for non-finite inputs).

§Panic

Never panics.