Function floor
pub fn floor(x: &Variant) -> VariantExpand description
Rounds x downward (towards negative infinity), returning the largest whole number that is not more than x. Supported types: int, float, Vector2, Vector2i, Vector3, Vector3i, Vector4, Vector4i.
var a = floor(2.99) # a is 2.0
a = floor(-2.99) # a is -3.0See also [method ceil], [method round], and [method snapped].
Note: For better type safety, use [method floorf], [method floori], floor, floor, or floor.