Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
drewmccluskey edited this page Jan 8, 2019 · 3 revisions

floor

This function will round an input decimal down.

Syntax:

floor(val)
Argument Description
double val The value to round down

Returns: int

Description:

This function will round an input decimal down, it is similar to round(); but instead will always round down compared to the nearest whole number.

Example:

double numberToRoundDown = 5.9999;
var RoundedNumberDown = floor(numberToRoundDown); //return 5

This code will round down double numberToRoundDown with value 5.9999 to var RoundedNumberDown with value 5.

Back to number_functions

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /