Table of Contents
Previous Section Next Section

floor

#include <cmath>float floor(float num);double floor(double num);
long double floor(long double num);

The floor( ) function returns the largest integer (represented as a floating-point value) not greater than num. For example, given 1.02, floor( ) would return 1.0. Given –1.02, floor( ) would return –2.0.

Related functions are fceil( ) and fmod( ).


Table of Contents
Previous Section Next Section