Skip to main content

splash_round

Function splash_round 

Source
pub fn splash_round(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::*. Round half-integers toward +∞, returning i32.

Implements floor(x + 0.5). This means:

  • 0.5 rounds to 1 (toward +∞).
  • −0.5 rounds to 0 (toward +∞, i.e. not away from zero).

Equivalent to C++ splashRound.

§Valid input range

Any f64. See splash_floor for edge-case behaviour on non-finite inputs.

§Panic

Never panics.