Values
MathSin
Return the sine of the input.
MathCos
Return the cosine of the input.
MathTan
Return the tangent of the input.
MathSinh
Return the hyperbolic sine of the input.
MathCosh
Return the hyperbolic cosine of the input.
MathTanh
Return the hyperbolic tangent of the input.
MathAsin
Return the arc sine of the input.
MathAcos
Return the arc cosine of the input.
MathAtan
Return the arc tangent of the input.
MathAtan2
Return the arc tangent of the input, using the signs of both parameters to determine the exact angle.
MathSqrt
Return the square root of the input.
MathFmod
Return the remainder of one input divided by the other, using floating-point numbers.
MathFposmod
Return the positive remainder of one input divided by the other, using floating-point numbers.
MathFloor
Return the input rounded down.
MathCeil
Return the input rounded up.
MathRound
Return the input rounded to the nearest integer.
MathAbs
Return the absolute value of the input.
MathSign
Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative.
MathPow
Return the input raised to a given power.
MathLog
Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use.
MathExp
Return the mathematical constant e raised to the specified power of the input. e has an approximate value of 2.71828.
MathIsnan
Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist.
MathIsinf
Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist.
MathEase
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.
MathDecimals
Return the number of digit places after the decimal that the first non-zero digit occurs.
MathStepify
Return the input snapped to a given step.
MathLerp
Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula a + (a - b) * t
.
MathMoveToward
Moves the number toward a value, based on the third input.
MathDectime
Return the result of value
decreased by step
* amount
.
MathRandomize
Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
MathRand
Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function.
MathRandf
Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication.
MathRandom
Return a random floating-point value between the two inputs.
MathSeed
Set the seed for the random number generator.
MathRandseed
Return a random value from the given seed, along with the new seed.
MathDeg2rad
Convert the input from degrees to radians.
MathRad2deg
Convert the input from radians to degrees.
MathLinear2db
Convert the input from linear volume to decibel volume.
MathDb2linear
Convert the input from decibel volume to linear volume.
MathPolar2cartesian
Converts a 2D point expressed in the polar coordinate system (a distance from the origin r
and an angle th
) to the cartesian coordinate system (X and Y axis).
MathCartesian2polar
Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).
LogicMax
Return the greater of the two numbers, also known as their maximum.
LogicMin
Return the lesser of the two numbers, also known as their minimum.
LogicClamp
Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to min(max(input, range_low), range_high)
.
LogicNearestPo2
Return the nearest power of 2 to the input.
ObjWeakref
Create a godot.WeakRef
from the input.
FuncFuncref
Create a godot.FuncRef
from the input.
TypeConvert
Convert between types.
TypeOf
Return the type of the input as an integer. Check godot.Variant_Type
for the integers that might be returned.
TypeExists
Checks if a type is registered in the godot.ClassDB
.
TextChar
Return a character with the given ascii value.
TextStr
Convert the input to a string.
TextPrint
Print the given string to the output window.
TextPrinterr
Print the given string to the standard error output.
TextPrintraw
Print the given string to the standard output, without adding a newline.
StrToVar
Deserialize a Variant
from a string serialized using godot.VisualScriptBuiltinFunc_BuiltinFunc.varToStr
.
VarToBytes
Serialize a Variant
to a cs.UInt8
.
BytesToVar
Deserialize a Variant
from a cs.UInt8
serialized using godot.VisualScriptBuiltinFunc_BuiltinFunc.varToBytes
.
Colorn
Return the godot.Color
with the given name and alpha ranging from 0 to 1.
Note: Names are defined in color_names.inc
.
MathSmoothstep
Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to godot.VisualScriptBuiltinFunc_BuiltinFunc.mathLerp
, but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula:
var t = clamp((weight - from) / (to - from), 0.0, 1.0)
return t * t * (3.0 - 2.0 * t)
FuncMax
Represents the size of the godot.VisualScriptBuiltinFunc_BuiltinFunc
enum.