Attention: Here be dragons
This is the
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Built-in GDScript constants, functions, and annotations.
A list of GDScript-specific utility functions and annotations accessible from any script.
For the list of the global functions and constants see @GlobalScope.
get_stack ( )
print_debug ( ... ) vararg
print_stack ( )
range ( ... ) vararg
Constant that represents how many times the diameter of a circle fits around its perimeter. This is equivalent to
TAU / 2, or 180 degrees in rotations.
The circle constant, the circumference of the unit circle in radians. This is equivalent to
PI * 2, or 360 degrees in rotations.
Positive floating-point infinity. This is the result of floating-point division when the divisor is
0.0. For negative infinity, use
-INF. Dividing by
-0.0 will result in negative infinity if the numerator is positive, so dividing by
0.0 is not the same as dividing by
0.0 == -0.0 returning
Warning: Numeric infinity is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer number by
0 will not result in INF and will result in a run-time error instead.
"Not a Number", an invalid floating-point value. NAN has special properties, including that
!= always returns
true, while other comparison operators always return
false. This is true even when comparing with itself (
NAN == NAN returns
NAN != NAN returns
true). It is returned by some invalid operations, such as dividing floating-point
Warning: "Not a Number" is only a concept with floating-point numbers,