vec4 [object]
- read-only properties
- [real] length
- [real] length_squared
- [vec4] normalized - return a vector with length = 1 if possible, length = 0 if too short
- [int] size - returns 4 - the number of components in this vector
- read/write properties
- [real] x
- [real] y
- [real] z
- [real] w
- overloaded operators
+
- adds two vec4/real values
-
- subtracts two vec4/real values
*
- multiplies two vec4/real values
/
- divides two vec4/real values
%
- returns modulo of two vec4/real values
- comparison between vec4 values: first by X, then by Y, then by Z, then by W
- unary
-
- returns negated vec4
- other features:
- cloning support
- serialization support
- GC-safe
- indexing support for indices 0 - 3: returns/sets the specified subvalue
- tostring, dump = "vec4(<x>;<y>;<z>;<w>)"