Skip to content

class_@gdscript

reduz edited this page Feb 23, 2014 · 13 revisions

@GDScript

Brief Description

Built-in GDScript functions.

Member Functions

Description

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

Member Function Description

== sin ==

  • real sin" ( real s ) \ Standard sine function. == cos ==
  • real cos" ( real s ) \ Standard cosine function. == tan ==
  • real tan" ( real s ) \ Standard tangent function. == sinh ==
  • real sinh" ( real s ) \ Hyperbolic sine. == tanh ==
  • real tanh" ( real s ) \ Hyperbolic tangent. == asin ==
  • real asin" ( real s ) \ Arc-sine. == acos ==
  • real acos" ( real s ) \ Arc-cosine. == atan ==
  • real atan" ( real s ) \ Arc-tangent. == atan2 ==
  • real atan2" ( real x, real y ) \ Arc-tangent that takes a 2D vector as argument, retuns the full -pi to +pi range. == sqrt ==
  • real sqrt" ( real s ) \ Square root. == fmod ==
  • real fmod" ( real x, real y ) \ Module (remainder of x/y). == fposmod ==
  • real fposmod" ( real x, real y ) \ Module (remainder of x/y) that wraps equally in positive and negative. == floor ==
  • real floor" ( real s ) \ Floor (rounds down to nearest integer). == ceil ==
  • real ceil" ( real s ) \ Ceiling (rounds up to nearest integer). == round ==
  • real round" ( real s ) \ Round to nearest integer. == abs ==
  • real abs" ( real s ) \ Remove sign (works for integer and float). == sign ==
  • real sign" ( real s ) \ Return sign (-1 or +1). == pow ==
  • real pow" ( real x, real y ) \ Power function, x elevate to y. == log ==
  • real log" ( real s ) \ Natural logarithm. == exp ==
  • real exp" ( real s ) \ Exponential logarithm. == isnan ==
  • real isnan" ( real s ) \ Return true if the float is not a number. == isinf ==
  • real isinf" ( real s ) \ Return true if the float is infinite. == ease ==
  • real ease" ( real s, real curve ) \ 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. == decimals ==
  • real decimals" ( real step ) \ Return the amount of decimals in the floating point value. == stepify ==
  • real stepify" ( real s, real step ) \ Snap float value to a given step. == rand ==
  • int rand" ( ) \ Random value (integer). == randf ==
  • real randf" ( ) \ Random value (0 to 1 float). == rand_range ==
  • real rand_range" ( real from, real to ) \ Random range. == rand_seed ==
  • Array rand_seed" ( real seed ) \ random from seed, pass a seed and an array with both number and new seed is returned. == deg2rad ==
  • real deg2rad" ( real deg ) \ Convert from degrees to radians. == rad2deg ==
  • real rad2deg" ( real rad ) \ Convert from radias to degrees. == linear2db ==
  • real linear2db" ( real nrg ) \ Convert from linear energy to decibels (audio). == db2linear ==
  • real db2linear" ( real db ) \ Convert from decibels to linear energy (audio). == max ==
  • real max" ( real a, real b ) \ Return the maximum of two values. == min ==
  • real min" ( real a, real b ) \ Return the minimum of two values. == clamp ==
  • real clamp" ( real val, real min, real max ) \ Clamp both values to a range. == nearest_po2 ==
  • int nearest_po2" ( int val ) \ Return the nearest larger power of 2 for an integer. == weakref ==
  • Object weakref" ( Object obj ) \ Return a weak reference to an object. == convert ==
  • Object convert" ( var what, int type ) \ Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in Global Scope. == str ==
  • String str" ( var what, var ... ) \ Convert one or more arguments to strings in the best way possible. == str ==
  • String str" ( var what, var ... ) \ Convert one or more arguments to strings in the best way possible. == print ==
  • Nil print" ( var what, var ... ) \ Print one or more arguments to strings in the best way possible to a console line. == printerr ==
  • Nil printerr" ( var what, var ... ) \ Print one or more arguments to strings in the best way possible to standard error line. == printraw ==
  • Nil 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. == range ==
  • Array range" ( var ... ) \ 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).

Clone this wiki locally