OxL Reference

method f32.floor

The largest integer value not above x, as a float.

Example:

oxl✓ checked in CI
fn main() io {
  let x: f32 = 2.7
  print("{x.floor()}")
}
Output
2.0
pub(api) fn floor() -> f32

Complexity. O(1).

Since. 1.0.0-beta

Returns

f32

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/numbers.oxl:4243

See also