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

Function B2Vec2DistanceSquared

CommonB2Math.go:547–550  ·  view source on GitHub ↗
(a, b B2Vec2)

Source from the content-addressed store, hash-verified

545}
546
547func B2Vec2DistanceSquared(a, b B2Vec2) float64 {
548 c := B2Vec2Sub(a, b)
549 return B2Vec2Dot(c, c)
550}
551
552func B2Vec3MultScalar(s float64, a B2Vec3) B2Vec3 {
553 return MakeB2Vec3(s*a.X, s*a.Y, s*a.Z)

Callers 5

SetMethod · 0.85
InitializeMethod · 0.85
CreateLoopMethod · 0.85
CreateChainMethod · 0.85

Calls 2

B2Vec2SubFunction · 0.85
B2Vec2DotFunction · 0.85

Tested by

no test coverage detected