IndexClassesCategoriesInheritance

@GDScript

Built-in GDScript functions.

Category: Core

Public Methods:

real sin ( real s )
real cos ( real s )
real tan ( real s )
real sinh ( real s )
real cosh ( real s )
real tanh ( real s )
real asin ( real s )
real acos ( real s )
real atan ( real s )
real atan2 ( real x, real y )
real sqrt ( real s )
real fmod ( real x, real y )
real fposmod ( real x, real y )
real floor ( real s )
real ceil ( real s )
real round ( real s )
real abs ( real s )
real sign ( real s )
real pow ( real x, real y )
real log ( real s )
real exp ( real s )
real isnan ( real s )
real isinf ( real s )
real ease ( real s, real curve )
real decimals ( real step )
real stepify ( real s, real step )
int rand ()
real randf ()
real rand_range ( real from, real to )
Array rand_seed ( real seed )
real deg2rad ( real deg )
real rad2deg ( real rad )
real linear2db ( real nrg )
real db2linear ( real db )
real max ( real a, real b )
real min ( real a, real b )
real clamp ( real val, real min, real max )
int nearest_po2 ( int val )
Object weakref ( Object obj )
Object convert ( var what, int type )
String str ( var what, var ... )
Nil print ( var what, var ... )
Nil printerr ( var what, var ... )
Nil printraw ( var what, var ... )
Array range ( var ... )

Description:

This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects.

Method Documentation:

Standard sine function.
Standard cosine function.
Standard tangent function.
Hyperbolic sine.
Hyperbolic tangent.
Arc-sine.
Arc-cosine.
Arc-tangent.
Arc-tangent that takes a 2D vector as argument, retuns the full -pi to +pi range.
Square root.
Module (remainder of x/y).
Module (remainder of x/y) that wraps equally in positive and negative.
Floor (rounds down to nearest integer).
Ceiling (rounds up to nearest integer).
Round to nearest integer.
Remove sign (works for integer and float).
Return sign (-1 or +1).
Power function, x elevate to y.
Natural logarithm.
Exponential logarithm.
Return true if the float is not a number.
Return true if the float is infinite.
Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
Return the amount of decimals in the floating point value.
Snap float value to a given step.
Random value (integer).
Random value (0 to 1 float).
Random range.
random from seed, pass a seed and an array with both number and new seed is returned.
Convert from degrees to radians.
Convert from radias to degrees.
Convert from linear energy to decibels (audio).
Convert from decibels to linear energy (audio).
Return the maximum of two values.
Return the minimum of two values.
Clamp both values to a range.
Return the nearest larger power of 2 for an integer.
Return a weak reference to an object.
Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in Global Scope.
String @GDScript::str ( var what, var ... )
Convert one or more arguments to strings in the best way possible.
Nil @GDScript::print ( var what, var ... )
Print one or more arguments to strings in the best way possible to a console line.
Nil @GDScript::printerr ( var what, var ... )
Print one or more arguments to strings in the best way possible to standard error line.
Nil @GDScript::printraw ( var what, var ... )
Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial,final-1,increment).

Copyright 2008-2010 Codenix SRL