static float Floor( float f )

robot_2Generated
code_blocksInput

Description

The Floor method in the MathX class is a static extension method that returns the largest integer less than or equal to the specified single-precision floating-point number. This method is useful for rounding down a floating-point number to the nearest whole number.

Usage

To use the Floor method, simply call it on a float value. This method is an extension method, so it can be called directly on a float instance.

Example

float value = 3.7f;
float flooredValue = MathX.Floor(value);
// flooredValue will be 3.0f