A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.wikibooks.org/wiki/C++_Programming/Code/Standard_C_Library/Functions/floor below:

C++ Programming/Code/Standard C Library/Functions/floor - Wikibooks, open books for an open world

floor[edit | edit source] Syntax
#include <cmath>
double floor( double arg );

The function floor() returns the largest integer value not greater than arg.

// Example for positive numbers
y = 6.04;
x = floor( y );

would result in x being set to 6 (double 6.0).

// Example for negative numbers
y = -6.04;
x = floor( y );

would result in x being set to -7 (double -7.0).

Related topics
ceil - fmod

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4