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

Method Length

math32/vector4.go:409–412  ·  view source on GitHub ↗

Length returns the length of this vector.

()

Source from the content-addressed store, hash-verified

407
408// Length returns the length of this vector.
409func (v *Vector4) Length() float32 {
410
411 return Sqrt(v.X*v.X + v.Y*v.Y + v.Z*v.Z + v.W*v.W)
412}
413
414// Normalize normalizes this vector so its length will be 1.
415// Returns the pointer to this updated vector.

Callers 2

NormalizeMethod · 0.95
SetLengthMethod · 0.95

Calls 1

SqrtFunction · 0.85

Tested by

no test coverage detected