Skip to reading
GDScript Programming & Godot

seed()

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
seed(base: int) -> void

Set the global random seed or randomize it. Use a separate generator for isolated puzzle randomness.

sign()#

Code example
sign(x: Variant) -> Variant

Sign of a value as negative, zero or positive unit.

signf()#

Code example
signf(x: float) -> float

Sign of a value as negative, zero or positive unit.

signi()#

Code example
signi(x: int) -> int

Sign of a value as negative, zero or positive unit.

sin()#

Code example
sin(angle_rad: float) -> float

Trigonometric/hyperbolic calculation; ordinary angle inputs use radians.

sinh()#

Code example
sinh(x: float) -> float

Trigonometric/hyperbolic calculation; ordinary angle inputs use radians.

smoothstep()#

Code example
smoothstep(from: float, to: float, x: float) -> float

Shape a transition weight/curve; useful for animation and blending.

snapped()#

Code example
snapped(x: Variant, step: Variant) -> Variant

Snap a value to the supplied increment.

Page 316 of 378Permalink
Go to page