Reflect sets this vector to its reflection relative to the normal vector. The normal vector is assumed to be normalized. Returns the pointer to this updated vector.
(normal *Vector3)
| 564 | // The normal vector is assumed to be normalized. |
| 565 | // Returns the pointer to this updated vector. |
| 566 | func (v *Vector3) Reflect(normal *Vector3) *Vector3 { |
| 567 | |
| 568 | var tmp Vector3 |
| 569 | return v.Sub(tmp.Copy(normal).MultiplyScalar(2 * v.Dot(normal))) |
| 570 | } |
| 571 | |
| 572 | // AngleTo returns the angle between this vector and other |
| 573 | func (v *Vector3) AngleTo(other *Vector3) float32 { |
nothing calls this directly
no test coverage detected