MCPcopy
hub / github.com/g3n/engine / Normalize

Method Normalize

math32/vector3.go:363–366  ·  view source on GitHub ↗

Normalize normalizes this vector so its length will be 1. Returns the pointer to this updated vector.

()

Source from the content-addressed store, hash-verified

361// Normalize normalizes this vector so its length will be 1.
362// Returns the pointer to this updated vector.
363func (v *Vector3) Normalize() *Vector3 {
364
365 return v.DivideScalar(v.Length())
366}
367
368// DistanceTo returns the distance of this point to other.
369func (v *Vector3) DistanceTo(other *Vector3) float32 {

Callers 2

LookAtMethod · 0.95
ProjectOnVectorMethod · 0.45

Calls 2

DivideScalarMethod · 0.95
LengthMethod · 0.95

Tested by

no test coverage detected