bool(value?)
Creates a boolean value (32-bit) value.
value
: The input value.A boolean (32-bit) value
>>> bool 1
# bool(1)
out = true
>>> bool 0
# bool(0)
out = false
>>> bool true
# bool(true)
out = true
>>> bool false
# bool(false)
out = false
bool16(arguments)
Creates a vector of 16 bool
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
bool16(true)
will initialize all elements with 123.bool16([true, false, ...])
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool4(bool2(true,false), bool2(false,true))
or bool4(bool3(false,true,true), false)
)A bool16 vector initialized with the specified arguments
>>> bool16(true)
# bool16(true)
out = bool16(true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true)
bool2(arguments)
Creates a vector of 2 bool
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
bool2(true)
will initialize all elements with 123.bool2([true, false, ...])
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool4(bool2(true,false), bool2(false,true))
or bool4(bool3(false,true,true), false)
)A bool2 vector initialized with the specified arguments
>>> bool2(true)
# bool2(true)
out = bool2(true, true)
bool2x2(arguments)
Creates a 2 (rows) x 2 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool2x2(123)
will initialize all elements with 123.bool2x2(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool2x2 matrix initialized with the specified arguments
bool2x3(arguments)
Creates a 2 (rows) x 3 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool2x3(123)
will initialize all elements with 123.bool2x3(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool2x3 matrix initialized with the specified arguments
bool2x4(arguments)
Creates a 2 (rows) x 4 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool2x4(123)
will initialize all elements with 123.bool2x4(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool2x4 matrix initialized with the specified arguments
bool3(arguments)
Creates a vector of 3 bool
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
bool3(true)
will initialize all elements with 123.bool3([true, false, ...])
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool4(bool2(true,false), bool2(false,true))
or bool4(bool3(false,true,true), false)
)A bool3 vector initialized with the specified arguments
>>> bool3(true)
# bool3(true)
out = bool3(true, true, true)
bool3x2(arguments)
Creates a 3 (rows) x 2 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool3x2(123)
will initialize all elements with 123.bool3x2(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool3x2 matrix initialized with the specified arguments
bool3x3(arguments)
Creates a 3 (rows) x 3 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool3x3(123)
will initialize all elements with 123.bool3x3(1..9)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool3x3 matrix initialized with the specified arguments
bool3x4(arguments)
Creates a 3 (rows) x 4 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool3x4(123)
will initialize all elements with 123.bool3x4(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool3x4 matrix initialized with the specified arguments
bool4(arguments)
Creates a vector of 4 bool
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
bool4(true)
will initialize all elements with 123.bool4([true, false, ...])
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool4(bool2(true,false), bool2(false,true))
or bool4(bool3(false,true,true), false)
)A bool4 vector initialized with the specified arguments
>>> bool4(true)
# bool4(true)
out = bool4(true, true, true, true)
bool4x2(arguments)
Creates a 4 (rows) x 2 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool4x2(123)
will initialize all elements with 123.bool4x2(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool4x2 matrix initialized with the specified arguments
bool4x3(arguments)
Creates a 4 (rows) x 3 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool4x3(123)
will initialize all elements with 123.bool4x3(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool4x3 matrix initialized with the specified arguments
bool4x4(arguments)
Creates a 4 (rows) x 4 (columns) matrix of bool.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
bool4x4(123)
will initialize all elements with 123.bool4x4(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool3x4(bool4(1), bool4(2), bool4(3))
.A bool4x4 matrix initialized with the specified arguments
bool8(arguments)
Creates a vector of 8 bool
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
bool8(true)
will initialize all elements with 123.bool8([true, false, ...])
will initialize all elements with the array elements. The size of the array must match the size of the vector.bool4(bool2(true,false), bool2(false,true))
or bool4(bool3(false,true,true), false)
)A bool8 vector initialized with the specified arguments
>>> bool8(true)
# bool8(true)
out = bool8(true, true, true, true, true, true, true, true)
byte(value?)
Creates an unsigned byte value.
value
: The input value.An unsigned byte value
>>> byte
# byte
out = 0
>>> byte 0
# byte(0)
out = 0
>>> byte 255
# byte(255)
out = 255
byte16(arguments)
Creates a vector of 16 byte
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
byte16(123)
will initialize all elements with 123.byte16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.byte4(byte2(1,2), byte2(3,4))
or byte4(byte3(1,2,3), 4)
.A byte16 vector initialized with the specified arguments
>>> byte16
# byte16
out = byte16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> byte16(1..16)
# byte16(1..16)
out = byte16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> byte16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# byte16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = byte16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
byte32(arguments)
Creates a vector of 32 byte
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
byte32(123)
will initialize all elements with 123.byte32(1..32)
will initialize all elements with the array elements. The size of the array must match the size of the vector.byte4(byte2(1,2), byte2(3,4))
or byte4(byte3(1,2,3), 4)
.A byte32 vector initialized with the specified arguments
>>> byte32
# byte32
out = byte32(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> byte32(1..32)
# byte32(1..32)
out = byte32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
byte64(arguments)
Creates a vector of 64 byte
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
byte64(123)
will initialize all elements with 123.byte64(1..64)
will initialize all elements with the array elements. The size of the array must match the size of the vector.byte4(byte2(1,2), byte2(3,4))
or byte4(byte3(1,2,3), 4)
.A byte64 vector initialized with the specified arguments
>>> byte64
# byte64
out = byte64(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> byte64(1..64)
# byte64(1..64)
out = byte64(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64)
double(value?)
Creates a double value (64-bit) value.
value
: The input value.A double (64-bit) value
>>> double(1)
# double(1)
out = 1
>>> double(-1)
# double(-1)
out = -1
>>> double(100000000000)
# double(100000000000)
out = 100000000000
>>> double(1<<200)
# double(1 << 200)
out = 1.6069380442589903E+60
double2(arguments)
Creates a vector of 2 double
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
double2(123)
will initialize all elements with 123.double2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double4(double2(1,2), double2(3,4))
or double4(double3(1,2,3), 4)
.A double2 vector initialized with the specified arguments
>>> double2
# double2
out = double2(0, 0)
>>> double2(1..2)
# double2(1..2)
out = double2(1, 2)
>>> double2(10, 11)
# double2(10, 11)
out = double2(10, 11)
double2x2(arguments)
Creates a 2 (rows) x 2 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double2x2(123)
will initialize all elements with 123.double2x2(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double2x2 matrix initialized with the specified arguments
double2x3(arguments)
Creates a 2 (rows) x 3 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double2x3(123)
will initialize all elements with 123.double2x3(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double2x3 matrix initialized with the specified arguments
double2x4(arguments)
Creates a 2 (rows) x 4 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double2x4(123)
will initialize all elements with 123.double2x4(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double2x4 matrix initialized with the specified arguments
double3(arguments)
Creates a vector of 3 double
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
double3(123)
will initialize all elements with 123.double3(1..3)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double4(double2(1,2), double2(3,4))
or double4(double3(1,2,3), 4)
.A double3 vector initialized with the specified arguments
>>> double3
# double3
out = double3(0, 0, 0)
>>> double3(1..3)
# double3(1..3)
out = double3(1, 2, 3)
>>> double3(10, 11, 12)
# double3(10, 11, 12)
out = double3(10, 11, 12)
double3x2(arguments)
Creates a 3 (rows) x 2 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double3x2(123)
will initialize all elements with 123.double3x2(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double3x2 matrix initialized with the specified arguments
double3x3(arguments)
Creates a 3 (rows) x 3 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double3x3(123)
will initialize all elements with 123.double3x3(1..9)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double3x3 matrix initialized with the specified arguments
double3x4(arguments)
Creates a 3 (rows) x 4 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double3x4(123)
will initialize all elements with 123.double3x4(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double3x4 matrix initialized with the specified arguments
double4(arguments)
Creates a vector of 4 double
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
double4(123)
will initialize all elements with 123.double4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double4(double2(1,2), double2(3,4))
or double4(double3(1,2,3), 4)
.A double4 vector initialized with the specified arguments
>>> double4
# double4
out = double4(0, 0, 0, 0)
>>> double4(1..4)
# double4(1..4)
out = double4(1, 2, 3, 4)
>>> double4(10, 11, 12, 13)
# double4(10, 11, 12, 13)
out = double4(10, 11, 12, 13)
double4x2(arguments)
Creates a 4 (rows) x 2 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double4x2(123)
will initialize all elements with 123.double4x2(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double4x2 matrix initialized with the specified arguments
double4x3(arguments)
Creates a 4 (rows) x 3 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double4x3(123)
will initialize all elements with 123.double4x3(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double4x3 matrix initialized with the specified arguments
double4x4(arguments)
Creates a 4 (rows) x 4 (columns) matrix of double.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
double4x4(123)
will initialize all elements with 123.double4x4(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double3x4(double4(1), double4(2), double4(3))
.A double4x4 matrix initialized with the specified arguments
double8(arguments)
Creates a vector of 8 double
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
double8(123)
will initialize all elements with 123.double8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.double4(double2(1,2), double2(3,4))
or double4(double3(1,2,3), 4)
.A double8 vector initialized with the specified arguments
>>> double8
# double8
out = double8(0, 0, 0, 0, 0, 0, 0, 0)
>>> double8(1..8)
# double8(1..8)
out = double8(1, 2, 3, 4, 5, 6, 7, 8)
>>> double8(10, 11, 12, 13, 14, 15, 16, 17)
# double8(10, 11, 12, 13, 14, 15, 16, 17)
out = double8(10, 11, 12, 13, 14, 15, 16, 17)
float(value?)
Creates a float value (32-bit) value.
value
: The input value.A float (32-bit) value
>>> float(1)
# float(1)
out = 1
>>> float(-1)
# float(-1)
out = -1
>>> float(100000000000)
# float(100000000000)
out = 1E+11
float16(arguments)
Creates a vector of 16 float
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
float16(123)
will initialize all elements with 123.float16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float4(float2(1,2), float2(3,4))
or float4(float3(1,2,3), 4)
.A float16 vector initialized with the specified arguments
>>> float16
# float16
out = float16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> float16(1..16)
# float16(1..16)
out = float16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> float16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# float16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = float16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
float2(arguments)
Creates a vector of 2 float
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
float2(123)
will initialize all elements with 123.float2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float4(float2(1,2), float2(3,4))
or float4(float3(1,2,3), 4)
.A float2 vector initialized with the specified arguments
>>> float2
# float2
out = float2(0, 0)
>>> float2(1..2)
# float2(1..2)
out = float2(1, 2)
>>> float2(10, 11)
# float2(10, 11)
out = float2(10, 11)
float2x2(arguments)
Creates a 2 (rows) x 2 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float2x2(123)
will initialize all elements with 123.float2x2(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float2x2 matrix initialized with the specified arguments
float2x3(arguments)
Creates a 2 (rows) x 3 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float2x3(123)
will initialize all elements with 123.float2x3(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float2x3 matrix initialized with the specified arguments
float2x4(arguments)
Creates a 2 (rows) x 4 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float2x4(123)
will initialize all elements with 123.float2x4(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float2x4 matrix initialized with the specified arguments
float3(arguments)
Creates a vector of 3 float
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
float3(123)
will initialize all elements with 123.float3(1..3)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float4(float2(1,2), float2(3,4))
or float4(float3(1,2,3), 4)
.A float3 vector initialized with the specified arguments
>>> float3
# float3
out = float3(0, 0, 0)
>>> float3(1..3)
# float3(1..3)
out = float3(1, 2, 3)
>>> float3(10, 11, 12)
# float3(10, 11, 12)
out = float3(10, 11, 12)
float3x2(arguments)
Creates a 3 (rows) x 2 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float3x2(123)
will initialize all elements with 123.float3x2(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float3x2 matrix initialized with the specified arguments
float3x3(arguments)
Creates a 3 (rows) x 3 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float3x3(123)
will initialize all elements with 123.float3x3(1..9)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float3x3 matrix initialized with the specified arguments
float3x4(arguments)
Creates a 3 (rows) x 4 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float3x4(123)
will initialize all elements with 123.float3x4(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float3x4 matrix initialized with the specified arguments
float4(arguments)
Creates a vector of 4 float
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
float4(123)
will initialize all elements with 123.float4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float4(float2(1,2), float2(3,4))
or float4(float3(1,2,3), 4)
.A float4 vector initialized with the specified arguments
>>> float4
# float4
out = float4(0, 0, 0, 0)
>>> float4(1..4)
# float4(1..4)
out = float4(1, 2, 3, 4)
>>> float4(10, 11, 12, 13)
# float4(10, 11, 12, 13)
out = float4(10, 11, 12, 13)
float4x2(arguments)
Creates a 4 (rows) x 2 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float4x2(123)
will initialize all elements with 123.float4x2(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float4x2 matrix initialized with the specified arguments
float4x3(arguments)
Creates a 4 (rows) x 3 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float4x3(123)
will initialize all elements with 123.float4x3(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float4x3 matrix initialized with the specified arguments
float4x4(arguments)
Creates a 4 (rows) x 4 (columns) matrix of float.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
float4x4(123)
will initialize all elements with 123.float4x4(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float3x4(float4(1), float4(2), float4(3))
.A float4x4 matrix initialized with the specified arguments
float8(arguments)
Creates a vector of 8 float
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
float8(123)
will initialize all elements with 123.float8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.float4(float2(1,2), float2(3,4))
or float4(float3(1,2,3), 4)
.A float8 vector initialized with the specified arguments
>>> float8
# float8
out = float8(0, 0, 0, 0, 0, 0, 0, 0)
>>> float8(1..8)
# float8(1..8)
out = float8(1, 2, 3, 4, 5, 6, 7, 8)
>>> float8(10, 11, 12, 13, 14, 15, 16, 17)
# float8(10, 11, 12, 13, 14, 15, 16, 17)
out = float8(10, 11, 12, 13, 14, 15, 16, 17)
half(value?)
Creates a half float value (16-bit) value.
value
: The input value.A half float (16-bit) value
>>> half(1)
# half(1)
out = 1
>>> half(-1)
# half(-1)
out = -1
>>> half(1000.5)
# half(1000.5)
out = 1000.5
>>> kind out
# kind(out)
out = "half"
half16(arguments)
Creates a vector of 16 half
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
half16(123)
will initialize all elements with 123.half16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half4(half2(1,2), half2(3,4))
or half4(half3(1,2,3), 4)
.A half16 vector initialized with the specified arguments
>>> half16
# half16
out = half16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> half16(1..16)
# half16(1..16)
out = half16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> half16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# half16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = half16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
half2(arguments)
Creates a vector of 2 half
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
half2(123)
will initialize all elements with 123.half2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half4(half2(1,2), half2(3,4))
or half4(half3(1,2,3), 4)
.A half2 vector initialized with the specified arguments
>>> half2
# half2
out = half2(0, 0)
>>> half2(1..2)
# half2(1..2)
out = half2(1, 2)
>>> half2(10, 11)
# half2(10, 11)
out = half2(10, 11)
half2x2(arguments)
Creates a 2 (rows) x 2 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half2x2(123)
will initialize all elements with 123.half2x2(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half2x2 matrix initialized with the specified arguments
half2x3(arguments)
Creates a 2 (rows) x 3 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half2x3(123)
will initialize all elements with 123.half2x3(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half2x3 matrix initialized with the specified arguments
half2x4(arguments)
Creates a 2 (rows) x 4 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half2x4(123)
will initialize all elements with 123.half2x4(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half2x4 matrix initialized with the specified arguments
half3(arguments)
Creates a vector of 3 half
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
half3(123)
will initialize all elements with 123.half3(1..3)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half4(half2(1,2), half2(3,4))
or half4(half3(1,2,3), 4)
.A half3 vector initialized with the specified arguments
>>> half3
# half3
out = half3(0, 0, 0)
>>> half3(1..3)
# half3(1..3)
out = half3(1, 2, 3)
>>> half3(10, 11, 12)
# half3(10, 11, 12)
out = half3(10, 11, 12)
half32(arguments)
Creates a vector of 32 half
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
half32(123)
will initialize all elements with 123.half32(1..32)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half4(half2(1,2), half2(3,4))
or half4(half3(1,2,3), 4)
.A half32 vector initialized with the specified arguments
>>> half32
# half32
out = half32(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> half32(1..32)
# half32(1..32)
out = half32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
half3x2(arguments)
Creates a 3 (rows) x 2 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half3x2(123)
will initialize all elements with 123.half3x2(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half3x2 matrix initialized with the specified arguments
half3x3(arguments)
Creates a 3 (rows) x 3 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half3x3(123)
will initialize all elements with 123.half3x3(1..9)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half3x3 matrix initialized with the specified arguments
half3x4(arguments)
Creates a 3 (rows) x 4 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half3x4(123)
will initialize all elements with 123.half3x4(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half3x4 matrix initialized with the specified arguments
half4(arguments)
Creates a vector of 4 half
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
half4(123)
will initialize all elements with 123.half4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half4(half2(1,2), half2(3,4))
or half4(half3(1,2,3), 4)
.A half4 vector initialized with the specified arguments
>>> half4
# half4
out = half4(0, 0, 0, 0)
>>> half4(1..4)
# half4(1..4)
out = half4(1, 2, 3, 4)
>>> half4(10, 11, 12, 13)
# half4(10, 11, 12, 13)
out = half4(10, 11, 12, 13)
half4x2(arguments)
Creates a 4 (rows) x 2 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half4x2(123)
will initialize all elements with 123.half4x2(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half4x2 matrix initialized with the specified arguments
half4x3(arguments)
Creates a 4 (rows) x 3 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half4x3(123)
will initialize all elements with 123.half4x3(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half4x3 matrix initialized with the specified arguments
half4x4(arguments)
Creates a 4 (rows) x 4 (columns) matrix of half.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
half4x4(123)
will initialize all elements with 123.half4x4(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half3x4(half4(1), half4(2), half4(3))
.A half4x4 matrix initialized with the specified arguments
half8(arguments)
Creates a vector of 8 half
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
half8(123)
will initialize all elements with 123.half8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.half4(half2(1,2), half2(3,4))
or half4(half3(1,2,3), 4)
.A half8 vector initialized with the specified arguments
>>> half8
# half8
out = half8(0, 0, 0, 0, 0, 0, 0, 0)
>>> half8(1..8)
# half8(1..8)
out = half8(1, 2, 3, 4, 5, 6, 7, 8)
>>> half8(10, 11, 12, 13, 14, 15, 16, 17)
# half8(10, 11, 12, 13, 14, 15, 16, 17)
out = half8(10, 11, 12, 13, 14, 15, 16, 17)
int(value?)
Creates a signed-int (32-bit) value.
value
: The input value.A signed-int (32-bit) value
>>> int
# int
out = 0
>>> int 0
# int(0)
out = 0
>>> int(1 << 31 - 1)
# int(1 << 31 - 1)
out = 2_147_483_647
>>> int(-(1<<31))
# int(-(1 << 31))
out = -2_147_483_648
int16(arguments)
Creates a vector of 16 int
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
int16(123)
will initialize all elements with 123.int16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int4(int2(1,2), int2(3,4))
or int4(int3(1,2,3), 4)
.A int16 vector initialized with the specified arguments
>>> int16
# int16
out = int16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> int16(1..16)
# int16(1..16)
out = int16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> int16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# int16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = int16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
int2(arguments)
Creates a vector of 2 int
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
int2(123)
will initialize all elements with 123.int2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int4(int2(1,2), int2(3,4))
or int4(int3(1,2,3), 4)
.A int2 vector initialized with the specified arguments
>>> int2
# int2
out = int2(0, 0)
>>> int2(1..2)
# int2(1..2)
out = int2(1, 2)
>>> int2(10, 11)
# int2(10, 11)
out = int2(10, 11)
int2x2(arguments)
Creates a 2 (rows) x 2 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int2x2(123)
will initialize all elements with 123.int2x2(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int2x2 matrix initialized with the specified arguments
int2x3(arguments)
Creates a 2 (rows) x 3 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int2x3(123)
will initialize all elements with 123.int2x3(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int2x3 matrix initialized with the specified arguments
int2x4(arguments)
Creates a 2 (rows) x 4 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int2x4(123)
will initialize all elements with 123.int2x4(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int2x4 matrix initialized with the specified arguments
int3(arguments)
Creates a vector of 3 int
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
int3(123)
will initialize all elements with 123.int3(1..3)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int4(int2(1,2), int2(3,4))
or int4(int3(1,2,3), 4)
.A int3 vector initialized with the specified arguments
>>> int3
# int3
out = int3(0, 0, 0)
>>> int3(1..3)
# int3(1..3)
out = int3(1, 2, 3)
>>> int3(10, 11, 12)
# int3(10, 11, 12)
out = int3(10, 11, 12)
int3x2(arguments)
Creates a 3 (rows) x 2 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int3x2(123)
will initialize all elements with 123.int3x2(1..6)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int3x2 matrix initialized with the specified arguments
int3x3(arguments)
Creates a 3 (rows) x 3 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int3x3(123)
will initialize all elements with 123.int3x3(1..9)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int3x3 matrix initialized with the specified arguments
int3x4(arguments)
Creates a 3 (rows) x 4 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int3x4(123)
will initialize all elements with 123.int3x4(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int3x4 matrix initialized with the specified arguments
int4(arguments)
Creates a vector of 4 int
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
int4(123)
will initialize all elements with 123.int4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int4(int2(1,2), int2(3,4))
or int4(int3(1,2,3), 4)
.A int4 vector initialized with the specified arguments
>>> int4
# int4
out = int4(0, 0, 0, 0)
>>> int4(1..4)
# int4(1..4)
out = int4(1, 2, 3, 4)
>>> int4(10, 11, 12, 13)
# int4(10, 11, 12, 13)
out = int4(10, 11, 12, 13)
int4x2(arguments)
Creates a 4 (rows) x 2 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int4x2(123)
will initialize all elements with 123.int4x2(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int4x2 matrix initialized with the specified arguments
int4x3(arguments)
Creates a 4 (rows) x 3 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int4x3(123)
will initialize all elements with 123.int4x3(1..12)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int4x3 matrix initialized with the specified arguments
int4x4(arguments)
Creates a 4 (rows) x 4 (columns) matrix of int.
arguments
: The matrix item values. The total number of values must equal the total dimension of the matrix. The arguments can be:
int4x4(123)
will initialize all elements with 123.int4x4(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int3x4(int4(1), int4(2), int4(3))
.A int4x4 matrix initialized with the specified arguments
int8(arguments)
Creates a vector of 8 int
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
int8(123)
will initialize all elements with 123.int8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.int4(int2(1,2), int2(3,4))
or int4(int3(1,2,3), 4)
.A int8 vector initialized with the specified arguments
>>> int8
# int8
out = int8(0, 0, 0, 0, 0, 0, 0, 0)
>>> int8(1..8)
# int8(1..8)
out = int8(1, 2, 3, 4, 5, 6, 7, 8)
>>> int8(10, 11, 12, 13, 14, 15, 16, 17)
# int8(10, 11, 12, 13, 14, 15, 16, 17)
out = int8(10, 11, 12, 13, 14, 15, 16, 17)
long(value?)
Creates a signed-long (64-bit) value.
value
: The input value.A signed-long (64-bit) value
>>> long
# long
out = 0
>>> long 0
# long(0)
out = 0
>>> long(1 << 63 - 1)
# long(1 << 63 - 1)
out = 9_223_372_036_854_775_807
>>> long(-(1<<63))
# long(-(1 << 63))
out = -9_223_372_036_854_775_808
long2(arguments)
Creates a vector of 2 long
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
long2(123)
will initialize all elements with 123.long2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.long4(long2(1,2), long2(3,4))
or long4(long3(1,2,3), 4)
.A long2 vector initialized with the specified arguments
>>> long2
# long2
out = long2(0, 0)
>>> long2(1..2)
# long2(1..2)
out = long2(1, 2)
>>> long2(10, 11)
# long2(10, 11)
out = long2(10, 11)
long3(arguments)
Creates a vector of 3 long
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
long3(123)
will initialize all elements with 123.long3(1..3)
will initialize all elements with the array elements. The size of the array must match the size of the vector.long4(long2(1,2), long2(3,4))
or long4(long3(1,2,3), 4)
.A long3 vector initialized with the specified arguments
>>> long3
# long3
out = long3(0, 0, 0)
>>> long3(1..3)
# long3(1..3)
out = long3(1, 2, 3)
>>> long3(10, 11, 12)
# long3(10, 11, 12)
out = long3(10, 11, 12)
long4(arguments)
Creates a vector of 4 long
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
long4(123)
will initialize all elements with 123.long4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.long4(long2(1,2), long2(3,4))
or long4(long3(1,2,3), 4)
.A long4 vector initialized with the specified arguments
>>> long4
# long4
out = long4(0, 0, 0, 0)
>>> long4(1..4)
# long4(1..4)
out = long4(1, 2, 3, 4)
>>> long4(10, 11, 12, 13)
# long4(10, 11, 12, 13)
out = long4(10, 11, 12, 13)
long8(arguments)
Creates a vector of 8 long
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
long8(123)
will initialize all elements with 123.long8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.long4(long2(1,2), long2(3,4))
or long4(long3(1,2,3), 4)
.A long8 vector initialized with the specified arguments
>>> long8
# long8
out = long8(0, 0, 0, 0, 0, 0, 0, 0)
>>> long8(1..8)
# long8(1..8)
out = long8(1, 2, 3, 4, 5, 6, 7, 8)
>>> long8(10, 11, 12, 13, 14, 15, 16, 17)
# long8(10, 11, 12, 13, 14, 15, 16, 17)
out = long8(10, 11, 12, 13, 14, 15, 16, 17)
matrix(name,row,column,arguments)
Creates a matrix of the specified element type, number of rows and columns and optional values.
name
: The element type of the matrix (e.g float).row
: The number of rows.column
: The number of columns.arguments
: The optional values (must have 1 or row x column elements).A matrix of the specified row x column.
>>> matrix(float,4,3,1..12)
# matrix(float, 4, 3, 1..12)
out = float4x3(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
# col 0 1 2 / row
float3(1 , 2 , 3 ) # 0
float3(4 , 5 , 6 ) # 1
float3(7 , 8 , 9 ) # 2
float3(10 , 11 , 12 ) # 3
rgb(arguments)
Creates an rgb vector type with the specified argument values.
arguments
: The vector item values. The total number of values must equal the dimension of the vector (3). The arguments can be:
rgb(0xAABBCC)
will extract the RGB 8-bits component values (AA: R, BB: G, CC: B).rgb("#AABBCC")
or rgb("AABBCC")
will extract the RGB 8-bits component values (AA: R, BB: G, CC: B).rgb([0xAA,0xBB,0xCC])
will initialize rgb elements with the array elements. The size of the array must match the size of the rgb vector (3).rgb(float3(0.1, 0.2, 0.3)
).A rgb vector initialized with the specified arguments
>>> rgb(0xAABBCC)
# rgb(11189196)
out = rgb(170, 187, 204) ## AABBCC ##
>>> rgb("#AABBCC")
# rgb("#AABBCC")
out = rgb(170, 187, 204) ## AABBCC ##
>>> rgb("AABBCC")
# rgb("AABBCC")
out = rgb(170, 187, 204) ## AABBCC ##
>>> rgb([0xAA,0xBB,0xCC])
# rgb([170,187,204])
out = rgb(170, 187, 204) ## AABBCC ##
>>> out.xyz
# out.xyz
out = float3(0.6666667, 0.73333335, 0.8)
>>> rgb(out)
# rgb(out)
out = rgb(170, 187, 204) ## AABBCC ##
rgba(arguments)
Creates an rgba vector type with the specified argument values.
arguments
: The vector item values. The total number of values must equal the dimension of the vector (4). The arguments can be:
rgba(0xFFAABBCC)
will extract the RGB 8-bits component values (FF: A, AA: R, BB: G, CC: B).rgba("#FFAABBCC")
or rgba("FFAABBCC")
will extract the RGB 8-bits component values (FF: A, AA: R, BB: G, CC: B).rgba([0xAA,0xBB,0xCC,0xFF])
will initialize rgba elements with the array elements. The size of the array must match the size of the rgb vector (3).rgba(float4(0.1, 0.2, 0.3, 1.0)
).A rgb vector initialized with the specified arguments
>>> rgba(0xFFAABBCC)
# rgba(-5588020)
out = rgba(170, 187, 204, 255) ## AABBCCFF ##
>>> rgba("#FFAABBCC")
# rgba("#FFAABBCC")
out = rgba(170, 187, 204, 255) ## AABBCCFF ##
>>> rgba("FFAABBCC")
# rgba("FFAABBCC")
out = rgba(170, 187, 204, 255) ## AABBCCFF ##
>>> rgba([0xAA,0xBB,0xCC,0xFF])
# rgba([170,187,204,255])
out = rgba(170, 187, 204, 255) ## AABBCCFF ##
>>> out.xyzw
# out.xyzw
out = float4(0.6666667, 0.73333335, 0.8, 1)
>>> rgba(out)
# rgba(out)
out = rgba(170, 187, 204, 255) ## AABBCCFF ##
sbyte(value?)
Creates a signed-byte value.
value
: The input value.A signed-byte value
>>> sbyte
# sbyte
out = 0
>>> sbyte 0
# sbyte(0)
out = 0
>>> sbyte 127
# sbyte(127)
out = 127
>>> sbyte(-128)
# sbyte(-128)
out = -128
sbyte16(arguments)
Creates a vector of 16 sbyte
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
sbyte16(123)
will initialize all elements with 123.sbyte16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.sbyte4(sbyte2(1,2), sbyte2(3,4))
or sbyte4(sbyte3(1,2,3), 4)
.A sbyte16 vector initialized with the specified arguments
>>> sbyte16
# sbyte16
out = sbyte16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> sbyte16(1..16)
# sbyte16(1..16)
out = sbyte16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> sbyte16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# sbyte16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = sbyte16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
sbyte32(arguments)
Creates a vector of 32 sbyte
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
sbyte32(123)
will initialize all elements with 123.sbyte32(1..32)
will initialize all elements with the array elements. The size of the array must match the size of the vector.sbyte4(sbyte2(1,2), sbyte2(3,4))
or sbyte4(sbyte3(1,2,3), 4)
.A sbyte32 vector initialized with the specified arguments
>>> sbyte32
# sbyte32
out = sbyte32(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> sbyte32(1..32)
# sbyte32(1..32)
out = sbyte32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
sbyte64(arguments)
Creates a vector of 64 sbyte
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
sbyte64(123)
will initialize all elements with 123.sbyte64(1..64)
will initialize all elements with the array elements. The size of the array must match the size of the vector.sbyte4(sbyte2(1,2), sbyte2(3,4))
or sbyte4(sbyte3(1,2,3), 4)
.A sbyte64 vector initialized with the specified arguments
>>> sbyte64
# sbyte64
out = sbyte64(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> sbyte64(1..64)
# sbyte64(1..64)
out = sbyte64(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64)
short(value?)
Creates a signed-short (16-bit) value.
value
: The input value.A signed-short (16-bit) value
>>> short
# short
out = 0
>>> short 0
# short(0)
out = 0
>>> short 32767
# short(32767)
out = 32_767
>>> short(-32768)
# short(-32768)
out = -32_768
>>> short 32768
Unable to convert type `int` to `short`
short16(arguments)
Creates a vector of 16 short
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
short16(123)
will initialize all elements with 123.short16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.short4(short2(1,2), short2(3,4))
or short4(short3(1,2,3), 4)
.A short16 vector initialized with the specified arguments
>>> short16
# short16
out = short16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> short16(1..16)
# short16(1..16)
out = short16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> short16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# short16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = short16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
short2(arguments)
Creates a vector of 2 short
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
short2(123)
will initialize all elements with 123.short2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.short4(short2(1,2), short2(3,4))
or short4(short3(1,2,3), 4)
.A short2 vector initialized with the specified arguments
>>> short2
# short2
out = short2(0, 0)
>>> short2(1..2)
# short2(1..2)
out = short2(1, 2)
>>> short2(10, 11)
# short2(10, 11)
out = short2(10, 11)
short32(arguments)
Creates a vector of 32 short
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
short32(123)
will initialize all elements with 123.short32(1..32)
will initialize all elements with the array elements. The size of the array must match the size of the vector.short4(short2(1,2), short2(3,4))
or short4(short3(1,2,3), 4)
.A short32 vector initialized with the specified arguments
>>> short32
# short32
out = short32(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> short32(1..32)
# short32(1..32)
out = short32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
short4(arguments)
Creates a vector of 4 short
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
short4(123)
will initialize all elements with 123.short4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.short4(short2(1,2), short2(3,4))
or short4(short3(1,2,3), 4)
.A short4 vector initialized with the specified arguments
>>> short4
# short4
out = short4(0, 0, 0, 0)
>>> short4(1..4)
# short4(1..4)
out = short4(1, 2, 3, 4)
>>> short4(10, 11, 12, 13)
# short4(10, 11, 12, 13)
out = short4(10, 11, 12, 13)
short8(arguments)
Creates a vector of 8 short
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
short8(123)
will initialize all elements with 123.short8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.short4(short2(1,2), short2(3,4))
or short4(short3(1,2,3), 4)
.A short8 vector initialized with the specified arguments
>>> short8
# short8
out = short8(0, 0, 0, 0, 0, 0, 0, 0)
>>> short8(1..8)
# short8(1..8)
out = short8(1, 2, 3, 4, 5, 6, 7, 8)
>>> short8(10, 11, 12, 13, 14, 15, 16, 17)
# short8(10, 11, 12, 13, 14, 15, 16, 17)
out = short8(10, 11, 12, 13, 14, 15, 16, 17)
uint(value?)
Creates an unsigned int (32-bit) value.
value
: The input value.An unsigned int (32-bit) value
>>> uint
# uint
out = 0
>>> uint 0
# uint(0)
out = 0
>>> uint(1<<32 - 1)
# uint(1 << 32 - 1)
out = 4_294_967_295
uint16(arguments)
Creates a vector of 16 uint
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
uint16(123)
will initialize all elements with 123.uint16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.uint4(uint2(1,2), uint2(3,4))
or uint4(uint3(1,2,3), 4)
.A uint16 vector initialized with the specified arguments
>>> uint16
# uint16
out = uint16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> uint16(1..16)
# uint16(1..16)
out = uint16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> uint16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# uint16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = uint16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
uint2(arguments)
Creates a vector of 2 uint
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
uint2(123)
will initialize all elements with 123.uint2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.uint4(uint2(1,2), uint2(3,4))
or uint4(uint3(1,2,3), 4)
.A uint2 vector initialized with the specified arguments
>>> uint2
# uint2
out = uint2(0, 0)
>>> uint2(1..2)
# uint2(1..2)
out = uint2(1, 2)
>>> uint2(10, 11)
# uint2(10, 11)
out = uint2(10, 11)
uint3(arguments)
Creates a vector of 3 uint
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
uint3(123)
will initialize all elements with 123.uint3(1..3)
will initialize all elements with the array elements. The size of the array must match the size of the vector.uint4(uint2(1,2), uint2(3,4))
or uint4(uint3(1,2,3), 4)
.A uint3 vector initialized with the specified arguments
>>> uint3
# uint3
out = uint3(0, 0, 0)
>>> uint3(1..3)
# uint3(1..3)
out = uint3(1, 2, 3)
>>> uint3(10, 11, 12)
# uint3(10, 11, 12)
out = uint3(10, 11, 12)
uint4(arguments)
Creates a vector of 4 uint
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
uint4(123)
will initialize all elements with 123.uint4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.uint4(uint2(1,2), uint2(3,4))
or uint4(uint3(1,2,3), 4)
.A uint4 vector initialized with the specified arguments
>>> uint4
# uint4
out = uint4(0, 0, 0, 0)
>>> uint4(1..4)
# uint4(1..4)
out = uint4(1, 2, 3, 4)
>>> uint4(10, 11, 12, 13)
# uint4(10, 11, 12, 13)
out = uint4(10, 11, 12, 13)
uint8(arguments)
Creates a vector of 8 uint
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
uint8(123)
will initialize all elements with 123.uint8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.uint4(uint2(1,2), uint2(3,4))
or uint4(uint3(1,2,3), 4)
.A uint8 vector initialized with the specified arguments
>>> uint8
# uint8
out = uint8(0, 0, 0, 0, 0, 0, 0, 0)
>>> uint8(1..8)
# uint8(1..8)
out = uint8(1, 2, 3, 4, 5, 6, 7, 8)
>>> uint8(10, 11, 12, 13, 14, 15, 16, 17)
# uint8(10, 11, 12, 13, 14, 15, 16, 17)
out = uint8(10, 11, 12, 13, 14, 15, 16, 17)
ulong(value?)
Creates an unsigned long (64-bit) value.
value
: The input value.An unsigned long (64-bit) value
>>> ulong
# ulong
out = 0
>>> ulong 0
# ulong(0)
out = 0
>>> ulong(1 << 64 - 1)
# ulong(1 << 64 - 1)
out = 18_446_744_073_709_551_615
ulong2(arguments)
Creates a vector of 2 ulong
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ulong2(123)
will initialize all elements with 123.ulong2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ulong4(ulong2(1,2), ulong2(3,4))
or ulong4(ulong3(1,2,3), 4)
.A ulong2 vector initialized with the specified arguments
>>> ulong2
# ulong2
out = ulong2(0, 0)
>>> ulong2(1..2)
# ulong2(1..2)
out = ulong2(1, 2)
>>> ulong2(10, 11)
# ulong2(10, 11)
out = ulong2(10, 11)
ulong3(arguments)
Creates a vector of 3 ulong
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ulong3(123)
will initialize all elements with 123.ulong3(1..3)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ulong4(ulong2(1,2), ulong2(3,4))
or ulong4(ulong3(1,2,3), 4)
.A ulong3 vector initialized with the specified arguments
>>> ulong3
# ulong3
out = ulong3(0, 0, 0)
>>> ulong3(1..3)
# ulong3(1..3)
out = ulong3(1, 2, 3)
>>> ulong3(10, 11, 12)
# ulong3(10, 11, 12)
out = ulong3(10, 11, 12)
ulong4(arguments)
Creates a vector of 4 ulong
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ulong4(123)
will initialize all elements with 123.ulong4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ulong4(ulong2(1,2), ulong2(3,4))
or ulong4(ulong3(1,2,3), 4)
.A ulong4 vector initialized with the specified arguments
>>> ulong4
# ulong4
out = ulong4(0, 0, 0, 0)
>>> ulong4(1..4)
# ulong4(1..4)
out = ulong4(1, 2, 3, 4)
>>> ulong4(10, 11, 12, 13)
# ulong4(10, 11, 12, 13)
out = ulong4(10, 11, 12, 13)
ulong8(arguments)
Creates a vector of 8 ulong
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ulong8(123)
will initialize all elements with 123.ulong8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ulong4(ulong2(1,2), ulong2(3,4))
or ulong4(ulong3(1,2,3), 4)
.A ulong8 vector initialized with the specified arguments
>>> ulong8
# ulong8
out = ulong8(0, 0, 0, 0, 0, 0, 0, 0)
>>> ulong8(1..8)
# ulong8(1..8)
out = ulong8(1, 2, 3, 4, 5, 6, 7, 8)
>>> ulong8(10, 11, 12, 13, 14, 15, 16, 17)
# ulong8(10, 11, 12, 13, 14, 15, 16, 17)
out = ulong8(10, 11, 12, 13, 14, 15, 16, 17)
ushort(value?)
Creates an unsigned short (16-bit) value.
value
: The input value.An unsigned short (16-bit) value
>>> ushort
# ushort
out = 0
>>> ushort 0
# ushort(0)
out = 0
>>> ushort 65535
# ushort(65535)
out = 65_535
ushort16(arguments)
Creates a vector of 16 ushort
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ushort16(123)
will initialize all elements with 123.ushort16(1..16)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ushort4(ushort2(1,2), ushort2(3,4))
or ushort4(ushort3(1,2,3), 4)
.A ushort16 vector initialized with the specified arguments
>>> ushort16
# ushort16
out = ushort16(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> ushort16(1..16)
# ushort16(1..16)
out = ushort16(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
>>> ushort16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
# ushort16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
out = ushort16(10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
ushort2(arguments)
Creates a vector of 2 ushort
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ushort2(123)
will initialize all elements with 123.ushort2(1..2)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ushort4(ushort2(1,2), ushort2(3,4))
or ushort4(ushort3(1,2,3), 4)
.A ushort2 vector initialized with the specified arguments
>>> ushort2
# ushort2
out = ushort2(0, 0)
>>> ushort2(1..2)
# ushort2(1..2)
out = ushort2(1, 2)
>>> ushort2(10, 11)
# ushort2(10, 11)
out = ushort2(10, 11)
ushort32(arguments)
Creates a vector of 32 ushort
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ushort32(123)
will initialize all elements with 123.ushort32(1..32)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ushort4(ushort2(1,2), ushort2(3,4))
or ushort4(ushort3(1,2,3), 4)
.A ushort32 vector initialized with the specified arguments
>>> ushort32
# ushort32
out = ushort32(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> ushort32(1..32)
# ushort32(1..32)
out = ushort32(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
ushort4(arguments)
Creates a vector of 4 ushort
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ushort4(123)
will initialize all elements with 123.ushort4(1..4)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ushort4(ushort2(1,2), ushort2(3,4))
or ushort4(ushort3(1,2,3), 4)
.A ushort4 vector initialized with the specified arguments
>>> ushort4
# ushort4
out = ushort4(0, 0, 0, 0)
>>> ushort4(1..4)
# ushort4(1..4)
out = ushort4(1, 2, 3, 4)
>>> ushort4(10, 11, 12, 13)
# ushort4(10, 11, 12, 13)
out = ushort4(10, 11, 12, 13)
ushort8(arguments)
Creates a vector of 8 ushort
items.
arguments
: The vector item values. The total number of values must equal the dimension of the vector. The arguments can be:
ushort8(123)
will initialize all elements with 123.ushort8(1..8)
will initialize all elements with the array elements. The size of the array must match the size of the vector.ushort4(ushort2(1,2), ushort2(3,4))
or ushort4(ushort3(1,2,3), 4)
.A ushort8 vector initialized with the specified arguments
>>> ushort8
# ushort8
out = ushort8(0, 0, 0, 0, 0, 0, 0, 0)
>>> ushort8(1..8)
# ushort8(1..8)
out = ushort8(1, 2, 3, 4, 5, 6, 7, 8)
>>> ushort8(10, 11, 12, 13, 14, 15, 16, 17)
# ushort8(10, 11, 12, 13, 14, 15, 16, 17)
out = ushort8(10, 11, 12, 13, 14, 15, 16, 17)
vector(name,dimension,arguments)
Creates a vector of the specified element type, with the number of elements and optional values.
name
: The element type of the vector (e.g float).dimension
: The dimension of the vector.arguments
: The optional values (must have 1 or dimension elements).A matrix of the specified row x column.
>>> vector(float, 4, 5..8)
# vector(float, 4, 5..8)
out = float4(5, 6, 7, 8)