# vec4 library Null safety

## Constants

dist → const double Function( a, b)
`distance`
div → const List<double> Function( out, a, b)
`divide`
len → const double Function( a)
`length`
mul → const List<double> Function( out, a, b)
`multiply`
sqrDist → const double Function( a, b)
`squaredDistance`
sqrLen → const double Function( a)
`squaredLength`
sub → const List<double> Function( out, a, b)
`subtract`

## Properties

forEach List<double> Function( a, int? stride, int? offset, int? count, dynamic fn, dynamic arg)
Perform some operation over an array of vec4s.
final

## Functions

ceil( out, a) List<double>
math.ceil the components of a vec4
clone(dynamic a) List<double>
Creates a new vec4 initialized with values from an existing vector
copy( out, a) List<double>
Copy the values from one vec4 to another
create() List<double>
Creates a new, empty vec4
cross( out, u, v, w) List<double>
Returns the cross-product of three vectors in a 4-dimensional space
distance( a, b)
Calculates the euclidian distance between two vec4's
divide( out, a, b) List<double>
Divides two vec4's
dot(dynamic a, dynamic b) List<double>
Calculates the dot product of two vec4's
equals( a, b) bool
Returns whether or not the vectors have approximately the same elements in the same position.
exactEquals( a, b) bool
Returns whether or not the vectors have exactly the same elements in the same position (when compared with ==)
floor( out, a) List<double>
math.floor the components of a vec4
fromValues(double x, double y, double z, ) List<double>
Creates a new vec4 initialized with the given values
inverse( out, a) List<double>
Returns the inverse of the components of a vec4
length( a)
Calculates the length of a vec4
lerp( out, a, b, ) List<double>
Performs a linear interpolation between two vec4's
max( out, a, b) List<double>
Returns the maximum of two vec4's
min( out, a, b) List<double>
Returns the minimum of two vec4's
multiply( out, a, b) List<double>
Multiplies two vec4's
negate( out, a) List<double>
Negates the components of a vec4
normalize( out, a) List<double>
Normalize a vec4
random( out, scale) List<double>
Generates a random vector with the given scale
round( out, a) List<double>
math.round the components of a vec4
scale( out, a, ) List<double>
Scales a vec4 by a scalar number
scaleAndAdd( out, a, b, double scale) List<double>
Adds two vec4's after scaling the second operand by a scalar value
set( out, double x, double y, double z, ) List<double>
Set the components of a vec4 to the given values
squaredDistance( a, b)
Calculates the squared euclidian distance between two vec4's
squaredLength( a)
Calculates the squared length of a vec4
str( a)
Returns a string representation of a vector
subtract( out, a, b) List<double>
Subtracts vector b from vector a
transformMat4( out, a, m) List<double>
Transforms the vec4 with a mat4.
transformQuat( out, a, q) List<double>
Transforms the vec4 with a quat
zero( out) List<double>
Set the components of a vec4 to zero