A Visual Script node used to call built-in functions.
``````    public class VisualScriptBuiltinFunc : VisualScriptNode
``````

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

### Constructors

``````    public VisualScriptBuiltinFunc()
``````

### Properties

``````    public BuiltinFunc Function { get; set; }
``````

The function to be executed.

### Methods

``````    public BuiltinFunc GetFunc()
``````

Getter for Function

``````    public void SetFunc(BuiltinFunc which)
``````

Setter for Function

### Inner Types

#### BuiltinFunc

| Name | Value | Description | |——|——-|————-| | MathSin | 0 | Return the sine of the input.| | MathCos | 1 | Return the cosine of the input.| | MathTan | 2 | Return the tangent of the input.| | MathSinh | 3 | Return the hyperbolic sine of the input.| | MathCosh | 4 | Return the hyperbolic cosine of the input.| | MathTanh | 5 | Return the hyperbolic tangent of the input.| | MathAsin | 6 | Return the arc sine of the input.| | MathAcos | 7 | Return the arc cosine of the input.| | MathAtan | 8 | Return the arc tangent of the input.| | MathAtan2 | 9 | Return the arc tangent of the input, using the signs of both parameters to determine the exact angle.| | MathSqrt | 10 | Return the square root of the input.| | MathFmod | 11 | Return the remainder of one input divided by the other, using floating-point numbers.| | MathFposmod | 12 | Return the positive remainder of one input divided by the other, using floating-point numbers.| | MathFloor | 13 | Return the input rounded down.| | MathCeil | 14 | Return the input rounded up.| | MathRound | 15 | Return the input rounded to the nearest integer.| | MathAbs | 16 | Return the absolute value of the input.| | MathSign | 17 | Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative.| | MathPow | 18 | Return the input raised to a given power.| | MathLog | 19 | Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use.| | MathExp | 20 | Return the mathematical constant [b]e[/b] raised to the specified power of the input. [b]e[/b] has an approximate value of 2.71828.| | MathIsnan | 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.| | MathIsinf | 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.| | MathEase | 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.| | MathDecimals | 24 | Return the number of digit places after the decimal that the first non-zero digit occurs.| | MathStepify | 25 | Return the input snapped to a given step.| | MathLerp | 26 | Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula [code]a + (a - b) * t[/code].| | MathInverseLerp | 27 | | | MathRangeLerp | 28 | | | MathDectime | 29 | Return the result of ‘value’ decreased by ‘step’ * ‘amount’.| | MathRandomize | 30 | Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.| | MathRand | 31 | 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 | 32 | 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 | 33 | Return a random floating-point value between the two inputs.| | MathSeed | 34 | Set the seed for the random number generator.| | MathRandseed | 35 | Return a random value from the given seed, along with the new seed.| | MathDeg2rad | 36 | Convert the input from degrees to radians.| | MathRad2deg | 37 | Convert the input from radians to degrees.| | MathLinear2db | 38 | Convert the input from linear volume to decibel volume.| | MathDb2linear | 39 | Convert the input from decibel volume to linear volume.| | MathPolar2cartesian | 40 | Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis).| | MathCartesian2polar | 41 | 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).| | MathWrap | 42 | | | MathWrapf | 43 | | | LogicMax | 44 | Return the greater of the two numbers, also known as their maximum.| | LogicMin | 45 | Return the lesser of the two numbers, also known as their minimum.| | LogicClamp | 46 | Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to [code]min(max(input, range_low), range_high)[/code].| | LogicNearestPo2 | 47 | Return the nearest power of 2 to the input.| | ObjWeakref | 48 | Create a [WeakRef] from the input.| | FuncFuncref | 49 | Create a [FuncRef] from the input.| | TypeConvert | 50 | Convert between types.| | TypeOf | 51 | Return the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned.| | TypeExists | 52 | Checks if a type is registered in the [ClassDB].| | TextChar | 53 | Return a character with the given ascii value.| | TextStr | 54 | Convert the input to a string.| | TextPrint | 55 | Print the given string to the output window.| | TextPrinterr | 56 | Print the given string to the standard error output.| | TextPrintraw | 57 | Print the given string to the standard output, without adding a newline.| | VarToStr | 58 | Serialize a [Variant] to a string.| | StrToVar | 59 | Deserialize a [Variant] from a string serialized using [code]VAR_TO_STR[/code].| | VarToBytes | 60 | Serialize a [Variant] to a [PoolByteArray].| | BytesToVar | 61 | Deserialize a [Variant] from a [PoolByteArray] serialized using [code]VAR_TO_BYTES[/code].| | Colorn | 62 | Return the [Color] with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc.| | MathSmoothstep | 63 | Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to [code]MATH_LERP[/code], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula: [codeblock] var t = clamp((weight - from) / (to - from), 0.0, 1.0) return t * t * (3.0 - 2.0 * t) [/codeblock]| | FuncMax | 64 | The maximum value the [member function] property can have.|

Tags: