Difference between revisions of "Floor - Math"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Plplecuyer
 
imported>Ice Eyes
m (→‎Examples: Added "Math." prefix)
 
Line 19: Line 19:
== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
int x = Floor(2.1) ; x == 2
int x = Math.Floor(2.1) ; x == 2
int y = Floor(5.9) ; y == 5
int y = Math.Floor(5.9) ; y == 5
</source>
</source>



Latest revision as of 11:14, 19 June 2019

Member of: Math Script

Calculates the largest integer less than or equal to the passed in value.

Syntax[edit | edit source]

int Function Floor(float afValue) native global

Parameters[edit | edit source]

  • afValue: The value to get the floor of.

Return Value[edit | edit source]

The floor of the passed-in value.

Examples[edit | edit source]

int x = Math.Floor(2.1) ; x == 2
int y = Math.Floor(5.9) ; y == 5

See Also[edit | edit source]