# Struct vec3

3 dimensional vector

### Constructors

Name Description
`this`
`this`
`this`
`this` create with all components filled with specified value

### Fields

Name Type Description
`vec` `float`
`x` `float`
`y` `float`
`z` `float`

### Properties

Name Type Description
`magnitude` [get] `float` `length` of vector
`magnitudeSquared` [get] `float` sum of squares of all vector components
`normalized` [get] `vec3` returns `normalized` copy of this vector
`toString` [get] `string`

### Methods

Name Description
`add` `add` value to all components of vector
`add` `add` components of another vector to corresponding components of this vector
`clear` fill all components of vector with specified value
`crossProduct` cross product
`div` divide all components of vector by value
`div` divide components of this vector by corresponding components of another vector
`dot` `dot` product (sum of by-component products of vector components)
`mul` multiply all components of vector by value
`mul` multiply components of this vector by corresponding components of another vector
`normalize` `normalize` vector: make its `length` == 1
`opAssign`
`opAssign`
`opAssign`
`opBinary` subtract value from all components of vector
`opBinary` `add` value to all components of vector
`opBinary` divide all components of vector by value
`opBinary` subtract value from all components of vector
`opBinary` multiply all components of vector by value
`opBinary` multiply vector by `matrix`
`opBinary` `add` value to all components of vector
`opOpAssign` `add` value to all components of vector
`opOpAssign` multiply all components of vector by value
`opOpAssign` subtract value from all components of vector
`opOpAssign` divide all components of vector by value
`opOpAssign` by component `add` values of corresponding components of other vector
`opOpAssign` by component multiply values of corresponding components of other vector
`opOpAssign` by component subtract values of corresponding components of other vector
`opOpAssign` by component divide values of corresponding components of other vector
`opUnary` returns vector with all components which are negative of components for this vector
`sub` subtract components of another vector from corresponding components of this vector
`sub` subtract value from all components of vector

Name Description
`b`
`g`
`length`
`r`