Function || Description || Signatures ||

`abs`

| Computes the absolute value of an integer number. |
`int64 abs(int64 n)`
`int32 abs(int32 n)`
`double abs(double n)`
`float abs(float n)`

`acos`

| Computes the principal value of the arc cosine of the input. |
`double acos(double arg)`
`float acos(float arg)`

`acosh`

| Computes the inverse hyperbolic cosine of the input. |
`double acosh(double arg)`
`float acosh(float arg)`

`addtogroup`

| Add the current point to the given group name, effectively setting its membership to true. If the group does not exist, it is implicitly created. This function has no effect if the point already belongs to the given group. |
`void addtogroup(string)`

`adjoint`

| Returns the adjoint of a 3x3 matrix. That is, the transpose of its cofactor matrix. |
`mat3d adjoint(mat3d input)`
`mat3f adjoint(mat3f input)`

`argsort`

| Returns a vector of the indexes that would sort the input vector. |
`vec3i argsort(vec3d v)`
`vec3i argsort(vec3f v)`
`vec3i argsort(vec3i v)`
`vec4i argsort(vec4d v)`
`vec4i argsort(vec4f v)`
`vec4i argsort(vec4i v)`

`asin`

| Computes the principal value of the arc sine of the input. |
`double asin(double arg)`
`float asin(float arg)`

`asinh`

| Computes the inverse hyperbolic sine of the input. |
`double asinh(double arg)`
`float asinh(float arg)`

`atan`

| Computes the principal value of the arc tangent of the input. |
`double atan(double arg)`
`float atan(float arg)`

`atan2`

| Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant. |
`double atan2(double y; double x)`
`float atan2(float y; float x)`

`atanh`

| Computes the inverse hyperbolic tangent of the input. |
`double atanh(double arg)`
`float atanh(float arg)`

`atof`

| Parses the string input, interpreting its content as a floating point number and returns its value as a double. |
`double atof(i8* str)`

`atoi`

| Parses the string input interpreting its content as an integral number, which is returned as a value of type int. |
`int32 atoi(i8* str)`

`cbrt`

| Computes the cubic root of the input. |
`double cbrt(double arg)`
`float cbrt(float arg)`

`ceil`

| Computes the smallest integer value not less than arg. |
`double ceil(double n)`
`float ceil(float n)`

`clamp`

| Clamps the first argument to the minimum second argument value and maximum third argument value |
`double clamp(double in; double min; double max)`
`float clamp(float in; float min; float max)`
`int64 clamp(int64 in; int64 min; int64 max)`
`int32 clamp(int32 in; int32 min; int32 max)`

`cofactor`

| Returns the cofactor matrix of a 3x3 matrix. That is, the matrix of its cofactors. |
`mat3d cofactor(mat3d input)`
`mat3f cofactor(mat3f input)`

`cos`

| Computes the cosine of arg (measured in radians). |
`double cos(double n)`
`float cos(float n)`

`cosh`

| Computes the hyperbolic cosine of the input. |
`double cosh(double arg)`
`float cosh(float arg)`

`cross`

| Returns the length of the given vector |
`vec3d cross(vec3d a; vec3d b)`
`vec3f cross(vec3f a; vec3f b)`
`vec3i cross(vec3i a; vec3i b)`

`curlsimplexnoise`

| Generates divergence-free 3D noise, computed using a curl function on Simplex Noise. |
`vec3d curlsimplexnoise(vec3d pos)`
`vec3d curlsimplexnoise(double pos; double; double)`

`degrees`

| Converts the number of radians to degrees. |
`double degrees(double radians)`
`float degrees(float radians)`

`deletepoint`

| Delete the current point from the point set. Note that this does not stop AX execution - any additional AX commands will be executed on the point and it will remain accessible until the end of execution. |
`void deletepoint()`

`determinant`

| Returns the determinant of a matrix. |
`double determinant(mat3d mat)`
`float determinant(mat3f mat)`
`double determinant(mat4d mat)`
`float determinant(mat4f mat)`

`diag`

| Create a diagonal matrix from a vector, or return the diagonal components of a matrix as a vector. |
`vec3d diag(mat3d vec)`
`vec3f diag(mat3f vec)`
`vec4d diag(mat4d vec)`
`vec4f diag(mat4f vec)`
`mat3d diag(vec3d mat)`
`mat3f diag(vec3f mat)`
`mat4d diag(vec4d mat)`
`mat4f diag(vec4f mat)`

`dot`

| Computes the dot product of two vectors. |
`double dot(vec3d a; vec3d b)`
`float dot(vec3f a; vec3f b)`
`int32 dot(vec3i a; vec3i b)`

`euclideanmod`

| Euclidean modulo, where by the result of the division operator on (dividend / divisor) is floored or ceiled depending on its sign, guaranteeing that the return value is always positive. The remainder is thus calculated with D - d * (d < 0 ? ceil(D/d) : floor(D/d)). This is NOT equal to a%b in AX. See truncatemod(), floormod(). |
`double euclideanmod(double dividend; double divisor)`
`float euclideanmod(float dividend; float divisor)`
`int64 euclideanmod(int64 dividend; int64 divisor)`
`int32 euclideanmod(int32 dividend; int32 divisor)`

`exp`

| Computes e (Euler's number, 2.7182818...) raised to the given power arg. |
`double exp(double n)`
`float exp(float n)`

`exp2`

| Computes 2 raised to the given power arg. |
`double exp2(double n)`
`float exp2(float n)`

`external`

| Find a custom user parameter with a given name of type 'float' in the Custom data provided to the AX compiler. If the data can not be found, or is not of the expected type 0.0f is returned. |
`float external(string str)`

`externalv`

| Find a custom user parameter with a given name of type 'vector float' in the Custom data provided to the AX compiler. If the data can not be found, or is not of the expected type { 0.0f, 0.0f, 0.0f } is returned. |
`vec3f externalv(string str)`

`fabs`

| Computes the absolute value of a floating point value arg. |
`double fabs(double n)`
`float fabs(float n)`

`fit`

| Fit the first argument to the output range by first clamping the value between the second and third input range arguments and then remapping the result to the output range fourth and fifth arguments |
`double fit(double value; double omin; double omax; double nmin; double nmax)`
`float fit(float value; float omin; float omax; float nmin; float nmax)`
`double fit(int64 value; int64 omin; int64 omax; int64 nmin; int64 nmax)`
`double fit(int32 value; int32 omin; int32 omax; int32 nmin; int32 nmax)`

`floor`

| Computes the largest integer value not greater than arg. |
`double floor(double n)`
`float floor(float n)`

`floormod`

| Floored modulo, where the result of the division operator on (dividend / divisor) is floored. The remainder is thus calculated with D - d * floor(D/d). This is the implemented modulo % operator of AX. This is equal to the python % implementation. See trucnatemod(), euclideanmod(). |
`double floormod(double dividend; double divisor)`
`float floormod(float dividend; float divisor)`
`int64 floormod(int64 dividend; int64 divisor)`
`int32 floormod(int32 dividend; int32 divisor)`

`getcoordx`

| Returns the current voxel's X index value in index space as an integer. |
`int32 getcoordx()`

`getcoordy`

| Returns the current voxel's Y index value in index space as an integer. |
`int32 getcoordy()`

`getcoordz`

| Returns the current voxel's Z index value in index space as an integer. |
`int32 getcoordz()`

`getvoxelpws`

| Returns the current voxel's position in world space as a vector float. |
`vec3f getvoxelpws()`

`hash`

| Return a hash of the provided string. |
`int64 hash(string str)`

`identity3`

| Returns the 3x3 identity matrix |
`mat3f identity3()`

`identity4`

| Returns the 4x4 identity matrix |
`mat4f identity4()`

`ingroup`

| Return whether or not the current point is a member of the given group name. This returns false if the group does not exist. |
`bool ingroup(string)`

`inverse`

| Return the inverse of a 3x3 matrix.If the matrix is singular, returns the input matrix. |
`mat3d inverse(mat3d input)`
`mat3f inverse(mat3f input)`

`isfinite`

| Returns whether the value is finite i.e. not infinite or NaN. For matrix and vector types will return false if any element is not finite. |
`bool isfinite(vec2d)`
`bool isfinite(vec2f)`
`bool isfinite(vec3d)`
`bool isfinite(vec3f)`
`bool isfinite(vec4d)`
`bool isfinite(vec4f)`
`bool isfinite(mat3f)`
`bool isfinite(mat3d)`
`bool isfinite(mat4f)`
`bool isfinite(mat4d)`
`bool isfinite(double arg)`
`bool isfinite(float arg)`

`isinf`

| Returns whether the value is inf. For matrix and vector types will return true if any element is inf. |
`bool isinf(vec2d)`
`bool isinf(vec2f)`
`bool isinf(vec3d)`
`bool isinf(vec3f)`
`bool isinf(vec4d)`
`bool isinf(vec4f)`
`bool isinf(mat3f)`
`bool isinf(mat3d)`
`bool isinf(mat4f)`
`bool isinf(mat4d)`
`bool isinf(double arg)`
`bool isinf(float arg)`

`isnan`

| Returns whether the value is NaN (not-a-number). |
`bool isnan(vec2d)`
`bool isnan(vec2f)`
`bool isnan(vec3d)`
`bool isnan(vec3f)`
`bool isnan(vec4d)`
`bool isnan(vec4f)`
`bool isnan(mat3f)`
`bool isnan(mat3d)`
`bool isnan(mat4f)`
`bool isnan(mat4d)`
`bool isnan(double arg)`
`bool isnan(float arg)`

`length`

| Returns the length of the given vector |
`double length(vec2d v)`
`float length(vec2f v)`
`double length(vec2i v)`
`double length(vec3d v)`
`float length(vec3f v)`
`double length(vec3i v)`
`double length(vec4d v)`
`float length(vec4f v)`
`double length(vec4i v)`

`lengthsq`

| Returns the squared length of the given vector |
`double lengthsq(vec2d v)`
`float lengthsq(vec2f v)`
`int32 lengthsq(vec2i v)`
`double lengthsq(vec3d v)`
`float lengthsq(vec3f v)`
`int32 lengthsq(vec3i v)`
`double lengthsq(vec4d v)`
`float lengthsq(vec4f v)`
`int32 lengthsq(vec4i v)`

`lerp`

| Performs bilinear interpolation between the values. If the amount is outside the range 0 to 1, the values will be extrapolated linearly. If amount is 0, the first value is returned. If it is 1, the second value is returned. This implementation is guaranteed to be monotonic. |
`double lerp(double a; double b; double amount)`
`float lerp(float a; float b; float amount)`

`log`

| Computes the natural (base e) logarithm of arg. |
`double log(double n)`
`float log(float n)`

`log10`

| Computes the common (base-10) logarithm of arg. |
`double log10(double n)`
`float log10(float n)`

`log2`

| Computes the binary (base-2) logarithm of arg. |
`double log2(double n)`
`float log2(float n)`

`max`

| Returns the larger of the given values. |
`double max(double a; double b)`
`float max(float a; float b)`
`int64 max(int64 a; int64 b)`
`int32 max(int32 a; int32 b)`

`min`

| Returns the smaller of the given values. |
`double min(double a; double b)`
`float min(float a; float b)`
`int64 min(int64 a; int64 b)`
`int32 min(int32 a; int32 b)`

`normalize`

| Returns the normalized result of the given vector. |
`vec3d normalize(vec3d v)`
`vec3f normalize(vec3f v)`
`vec3d normalize(vec3i v)`
`vec4d normalize(vec4d v)`
`vec4f normalize(vec4f v)`
`vec4d normalize(vec4i v)`

`polardecompose`

| Decompose an invertible 3x3 matrix into its orthogonal (unitary) matrix and symmetric matrix components. If the determinant of the unitary matrix is 1 it is a rotation, otherwise if it is -1 there is some part reflection. |
`bool polardecompose(mat3d input; mat3d unitary; mat3d symmetric)`
`bool polardecompose(mat3f input; mat3f unitary; mat3f symmetric)`

`postscale`

| Post-scale a given matrix by the provided vector. |
`void postscale(mat4d transform; vec3d vec)`
`void postscale(mat4f transform; vec3f vec)`

`pow`

| Computes the value of the first argument raised to the power of the second argument. |
`double pow(double base; double exp)`
`float pow(float base; float exp)`
`double pow(double base; int32 exp)`

`prescale`

| Pre-scale a given matrix by the provided vector. |
`void prescale(mat4d transform; vec3d vec)`
`void prescale(mat4f transform; vec3f vec)`

`pretransform`

| Return the transformed vector by transpose of this matrix. This function is equivalent to pre-multiplying the matrix. |
`vec3d pretransform(mat3d vec; vec3d mat)`
`vec3f pretransform(mat3f vec; vec3f mat)`
`vec3d pretransform(mat4d vec; vec3d mat)`
`vec3f pretransform(mat4f vec; vec3f mat)`
`vec4d pretransform(mat4d vec; vec4d mat)`
`vec4f pretransform(mat4f vec; vec4f mat)`

`print`

| Prints the input to the standard output stream. Warning: This will be run for every element. |
`void print(double n)`
`void print(float n)`
`void print(int64 n)`
`void print(int32 n)`
`void print(string n)`
`void print(vec2i n)`
`void print(vec2f n)`
`void print(vec2d n)`
`void print(vec3i n)`
`void print(vec3f n)`
`void print(vec3d n)`
`void print(vec4i n)`
`void print(vec4f n)`
`void print(vec4d n)`
`void print(mat3f n)`
`void print(mat3d n)`
`void print(mat4f n)`
`void print(mat4d n)`

`radians`

| Converts the number of degrees to radians. |
`double radians(double degrees)`
`float radians(float degrees)`

`rand`

| Creates a random number based on the provided seed. The number will be in the range of 0 to 1. The same number is produced for the same seed. Note that if rand is called without a seed the previous state of the random number generator is advanced for the currently processing element. This state is determined by the last call to rand() with a given seed. If rand is not called with a seed, the generator advances continuously across different elements which can produce non-deterministic results. It is important that rand is always called with a seed at least once for deterministic results. |
`double rand()`
`double rand(double seed)`
`double rand(int64 seed)`

`rand32`

| Creates a random number based on the provided 32 bit seed. The number will be in the range of 0 to 1. The same number is produced for the same seed. NOTE: This function does not share the same random number generator as rand(). rand32() may provide a higher throughput on some architectures, but will produce different results to rand(). NOTE: If rand32 is called without a seed the previous state of the random number generator is advanced for the currently processing element. This state is determined by the last call to rand32() with a given seed. If rand32 is not called with a seed, the generator advances continuously across different elements which can produce non-deterministic results. It is important that rand32 is always called with a seed at least once for deterministic results. |
`double rand32()`
`double rand32(double seed)`
`double rand32(int32 seed)`

`removefromgroup`

| Remove the current point from the given group name, effectively setting its membership to false. This function has no effect if the group does not exist. |
`void removefromgroup(string)`

`round`

| Computes the nearest integer value to arg (in floating-point format), rounding halfway cases away from zero. |
`double round(double n)`
`float round(float n)`

`sign`

| Implements signum, determining if the input is negative, zero or positive. Returns -1 for a negative number, 0 for the number zero, and +1 for a positive number. Note that this function does not check the sign of floating point +/-0.0 values. See signbit(). |
`int32 sign(double n)`
`int32 sign(float n)`
`int32 sign(int64 n)`
`int32 sign(int32 n)`

`signbit`

| Determines if the given floating point number input is negative. Returns true if arg is negative, false otherwise. Will return true for -0.0, false for +0.0 |
`bool signbit(double n)`
`bool signbit(float n)`

`simplexnoise`

| Compute simplex noise at coordinates x, y and z. Coordinates which are not provided will be set to 0. |
`double simplexnoise(double x)`
`double simplexnoise(double x; double y)`
`double simplexnoise(double x; double y; double z)`
`double simplexnoise(vec3d pos)`

`sin`

| Computes the sine of arg (measured in radians). |
`double sin(double n)`
`float sin(float n)`

`sinh`

| Computes the hyperbolic sine of the input. |
`double sinh(double arg)`
`float sinh(float arg)`

`sort`

| Returns the sorted result of the given vector. |
`vec3d sort(vec3d v)`
`vec3f sort(vec3f v)`
`vec3i sort(vec3i v)`
`vec4d sort(vec4d v)`
`vec4f sort(vec4f v)`
`vec4i sort(vec4i v)`

`sqrt`

| Computes the square root of arg. |
`double sqrt(double n)`
`float sqrt(float n)`

`tan`

| Computes the tangent of arg (measured in radians). |
`double tan(double n)`
`float tan(float n)`

`tanh`

| Computes the hyperbolic tangent of the input. |
`double tanh(double arg)`
`float tanh(float arg)`

`trace`

| Return the trace of a matrix, the sum of the diagonal elements. |
`double trace(mat3d mat)`
`float trace(mat3f mat)`
`double trace(mat4d mat)`
`float trace(mat4f mat)`

`transform`

| Return the transformed vector by the provided matrix. This function is equivalent to post-multiplying the matrix, i.e. vec * mult. |
`vec3d transform(vec3d vec; mat3d mat)`
`vec3f transform(vec3f vec; mat3f mat)`
`vec3d transform(vec3d vec; mat4d mat)`
`vec3f transform(vec3f vec; mat4f mat)`
`vec4d transform(vec4d vec; mat4d mat)`
`vec4f transform(vec4f vec; mat4f mat)`

`transpose`

| Returns the transpose of a matrix |
`mat3d transpose(mat3d mat)`
`mat3f transpose(mat3f mat)`
`mat4d transpose(mat4d mat)`
`mat4f transpose(mat4f mat)`

`truncatemod`

| Truncated modulo, where the result of the division operator on (dividend / divisor) is truncated. The remainder is thus calculated with D - d * trunc(D/d). This is equal to the C/C++ % implementation. This is NOT equal to a%b in AX. See floormod(), euclideanmod(). |
`double truncatemod(double dividend; double divisor)`
`float truncatemod(float dividend; float divisor)`
`int64 truncatemod(int64 dividend; int64 divisor)`
`int32 truncatemod(int32 dividend; int32 divisor)`