| Index | Classes | Categories | Inheritance

### @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:

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

Copyright 2008-2010 Codenix SRL