ApplyMatrix3 multiplies the specified 3x3 matrix by this vector. Returns the pointer to this updated vector.
(m *Matrix3)
| 451 | // ApplyMatrix3 multiplies the specified 3x3 matrix by this vector. |
| 452 | // Returns the pointer to this updated vector. |
| 453 | func (v *Vector3) ApplyMatrix3(m *Matrix3) *Vector3 { |
| 454 | |
| 455 | x := v.X |
| 456 | y := v.Y |
| 457 | z := v.Z |
| 458 | v.X = m[0]*x + m[3]*y + m[6]*z |
| 459 | v.Y = m[1]*x + m[4]*y + m[7]*z |
| 460 | v.Z = m[2]*x + m[5]*y + m[8]*z |
| 461 | return v |
| 462 | } |
| 463 | |
| 464 | // ApplyMatrix4 multiplies the specified 4x4 matrix by this vector. |
| 465 | // Returns the pointer to this updated vector. |
no outgoing calls
no test coverage detected