MCPcopy Create free account
hub / github.com/ByteArena/box2d / Length

Method Length

CommonB2Math.go:106–108  ·  view source on GitHub ↗

Get the length of this vector (the norm).

()

Source from the content-addressed store, hash-verified

104
105/// Get the length of this vector (the norm).
106func (v B2Vec2) Length() float64 {
107 return math.Sqrt(v.X*v.X + v.Y*v.Y)
108}
109
110/// Get the length squared. For performance, use this instead of
111/// b2Vec2::Length (if possible).

Callers 15

NormalizeMethod · 0.95
InitializeMethod · 0.80
GetCurrentLengthAMethod · 0.80
GetCurrentLengthBMethod · 0.80
B2Vec2DistanceFunction · 0.80
InitializeMethod · 0.80
SolveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected