Core Function Floor

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> Floor( <expression> ) </pre> === Description === Returns the largest integer less than or equal to the specified number. === Parameters === ==== expression ==== Any va...")

Latest revision as of 16:27, 2 December 2011

Floor( <expression> )

Contents

Description

Returns the largest integer less than or equal to the specified number.

Parameters

expression

Any valid numeric expression.

Return Value

Returns the rounded number.

Remarks

None.

Example

$msg = "";
$msg .= "Floor(4.8) = " . Floor(4.8) . @CR;
$msg .= "Floor(4.5) = " . Floor(4.5) . @CR;
$msg .= "Floor(4.3) = " . Floor(4.3) . @CR;
$msg .= "Floor(4) = " . Floor(4) . @CR;
$msg .= "Floor(-4.3) = " . Floor(-4.3) . @CR;
$msg .= "Floor(-4.5) = " . Floor(-4.5) . @CR;
$msg .= "Floor(-4.8) = " . Floor(-4.8) . @CR;
$msg .= "Floor(-4) = " . Floor(-4) . @CR;
 
MsgBox("Testing $msg");
// Output:
// Testing Floor(4.8) = 4
// Floor(4.5) = 4
// Floor(4.3) = 4
// Floor(4) = 4
// Floor(-4.3) = -5
// Floor(-4.5) = -5
// Floor(-4.8) = -5
// Floor(-4) = -4
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox