MCPcopy Index your code
hub / github.com/g3n/engine / Normalize

Method Normalize

math32/vector4.go:416–419  ·  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

414// Normalize normalizes this vector so its length will be 1.
415// Returns the pointer to this updated vector.
416func (v *Vector4) Normalize() *Vector4 {
417
418 return v.DivideScalar(v.Length())
419}
420
421// SetLength sets this vector to have the specified length.
422// If the current length is zero, does nothing.

Callers

nothing calls this directly

Calls 2

DivideScalarMethod · 0.95
LengthMethod · 0.95

Tested by

no test coverage detected