Skip to reading
GDScript Programming & Godot

floor()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
On this page

Earlier edition reference / Current 0.86.4.0 property paths > p. 350

Code example
floor(x: Variant) -> Variant

Round downward; the suffix selects a typed variant.

floorf()#

Code example
floorf(x: float) -> float

Round downward; the suffix selects a typed variant.

floori()#

Code example
floori(x: float) -> int

Round downward; the suffix selects a typed variant.

fmod()#

Code example
fmod(x: float, y: float) -> float

Remainder/modulo variants; pay attention to negative inputs and positive wrapping behavior.

fposmod()#

Code example
fposmod(x: float, y: float) -> float

Remainder/modulo variants; pay attention to negative inputs and positive wrapping behavior.

hash()#

Code example
hash(variable: Variant) -> int

Hash a value for lookup/comparison support; not a serialization or cryptographic guarantee.

instance_from_id()#

Code example
instance_from_id(instance_id: int) -> Object

Validate an instance ID or look up the live Object for that ID.

inverse_lerp()#

Code example
inverse_lerp(from: float, to: float, weight: float) -> float

Find the interpolation weight represented by a value in an interval.

Page 309 of 378Permalink
Go to page