VisualScriptBuiltinFunc

Inherits: VisualScriptNode < Resource < Reference < Object

A Visual Script node used to call built-in functions.

Description

A built-in function used inside a VisualScript. It is usually a math function or an utility function.

See also @GDScript, for the same functions in the GDScript language.

Properties

BuiltinFunc

function

0


Enumerations

enum BuiltinFunc:

BuiltinFunc MATH_SIN = 0

Return the sine of the input.

BuiltinFunc MATH_COS = 1

Return the cosine of the input.

BuiltinFunc MATH_TAN = 2

Return the tangent of the input.

BuiltinFunc MATH_SINH = 3

Return the hyperbolic sine of the input.

BuiltinFunc MATH_COSH = 4

Return the hyperbolic cosine of the input.

BuiltinFunc MATH_TANH = 5

Return the hyperbolic tangent of the input.

BuiltinFunc MATH_ASIN = 6

Return the arc sine of the input.

BuiltinFunc MATH_ACOS = 7

Return the arc cosine of the input.

BuiltinFunc MATH_ATAN = 8

Return the arc tangent of the input.

BuiltinFunc MATH_ATAN2 = 9

Return the arc tangent of the input, using the signs of both parameters to determine the exact angle.

BuiltinFunc MATH_SQRT = 10

Return the square root of the input.

BuiltinFunc MATH_FMOD = 11

Return the remainder of one input divided by the other, using floating-point numbers.

BuiltinFunc MATH_FPOSMOD = 12

Return the positive remainder of one input divided by the other, using floating-point numbers.

BuiltinFunc MATH_FLOOR = 13

Return the input rounded down.

BuiltinFunc MATH_CEIL = 14

Return the input rounded up.

BuiltinFunc MATH_ROUND = 15

Return the input rounded to the nearest integer.

BuiltinFunc MATH_ABS = 16

Return the absolute value of the input.

BuiltinFunc MATH_SIGN = 17

Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative.

BuiltinFunc MATH_POW = 18

Return the input raised to a given power.

BuiltinFunc MATH_LOG = 19

Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use.

BuiltinFunc MATH_EXP = 20

Return the mathematical constant e raised to the specified power of the input. e has an approximate value of 2.71828.

BuiltinFunc MATH_ISNAN = 21

Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist.

BuiltinFunc MATH_ISINF = 22

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.

BuiltinFunc MATH_EASE = 23

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.

BuiltinFunc MATH_DECIMALS = 24

Return the number of digit places after the decimal that the first non-zero digit occurs.

BuiltinFunc MATH_STEPIFY = 25

Return the input snapped to a given step.

BuiltinFunc MATH_LERP = 26

Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula a + (a - b) * t.

BuiltinFunc MATH_INVERSE_LERP = 27

BuiltinFunc MATH_RANGE_LERP = 28

BuiltinFunc MATH_MOVE_TOWARD = 29

Moves the number toward a value, based on the third input.

BuiltinFunc MATH_DECTIME = 30

Return the result of value decreased by step * amount.

BuiltinFunc MATH_RANDOMIZE = 31

Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.

BuiltinFunc MATH_RAND = 32

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.

BuiltinFunc MATH_RANDF = 33

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.

BuiltinFunc MATH_RANDOM = 34

Return a random floating-point value between the two inputs.

BuiltinFunc MATH_SEED = 35

Set the seed for the random number generator.

BuiltinFunc MATH_RANDSEED = 36

Return a random value from the given seed, along with the new seed.

BuiltinFunc MATH_DEG2RAD = 37

Convert the input from degrees to radians.

BuiltinFunc MATH_RAD2DEG = 38

Convert the input from radians to degrees.

BuiltinFunc MATH_LINEAR2DB = 39

Convert the input from linear volume to decibel volume.

BuiltinFunc MATH_DB2LINEAR = 40

Convert the input from decibel volume to linear volume.

BuiltinFunc MATH_POLAR2CARTESIAN = 41

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).

BuiltinFunc MATH_CARTESIAN2POLAR = 42

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).

BuiltinFunc MATH_WRAP = 43

BuiltinFunc MATH_WRAPF = 44

BuiltinFunc LOGIC_MAX = 45

Return the greater of the two numbers, also known as their maximum.

BuiltinFunc LOGIC_MIN = 46

Return the lesser of the two numbers, also known as their minimum.

BuiltinFunc LOGIC_CLAMP = 47

Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to min(max(input, range_low), range_high).

BuiltinFunc LOGIC_NEAREST_PO2 = 48

Return the nearest power of 2 to the input.

BuiltinFunc OBJ_WEAKREF = 49

Create a WeakRef from the input.

BuiltinFunc FUNC_FUNCREF = 50

Create a FuncRef from the input.

BuiltinFunc TYPE_CONVERT = 51

Convert between types.

BuiltinFunc TYPE_OF = 52

Return the type of the input as an integer. Check Variant.Type for the integers that might be returned.

BuiltinFunc TYPE_EXISTS = 53

Checks if a type is registered in the ClassDB.

BuiltinFunc TEXT_CHAR = 54

Return a character with the given ascii value.

BuiltinFunc TEXT_STR = 55

Convert the input to a string.

BuiltinFunc TEXT_PRINT = 56

Print the given string to the output window.

BuiltinFunc TEXT_PRINTERR = 57

Print the given string to the standard error output.

BuiltinFunc TEXT_PRINTRAW = 58

Print the given string to the standard output, without adding a newline.

BuiltinFunc VAR_TO_STR = 59

Serialize a Variant to a string.

BuiltinFunc STR_TO_VAR = 60

Deserialize a Variant from a string serialized using VAR_TO_STR.

BuiltinFunc VAR_TO_BYTES = 61

Serialize a Variant to a PoolByteArray.

BuiltinFunc BYTES_TO_VAR = 62

Deserialize a Variant from a PoolByteArray serialized using VAR_TO_BYTES.

BuiltinFunc COLORN = 63

Return the Color with the given name and alpha ranging from 0 to 1.

Note: Names are defined in color_names.inc.

BuiltinFunc MATH_SMOOTHSTEP = 64

Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to MATH_LERP, 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)

BuiltinFunc MATH_POSMOD = 65

BuiltinFunc MATH_LERP_ANGLE = 66

BuiltinFunc TEXT_ORD = 67

BuiltinFunc FUNC_MAX = 68

Represents the size of the BuiltinFunc enum.


Property Descriptions

BuiltinFunc function = 0

The function to be executed.