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

Function B2Vec2Add

CommonB2Math.go:522–524  ·  view source on GitHub ↗

Add two vectors component-wise.

(a, b B2Vec2)

Source from the content-addressed store, hash-verified

520
521/// Add two vectors component-wise.
522func B2Vec2Add(a, b B2Vec2) B2Vec2 {
523 return MakeB2Vec2(a.X+b.X, a.Y+b.Y)
524}
525
526// /// Subtract two vectors component-wise.
527func B2Vec2Sub(a, b B2Vec2) B2Vec2 {

Callers 15

GetClosestPointMethod · 0.85
GetWitnessPointsMethod · 0.85
B2DistanceFunction · 0.85
InitializeMethod · 0.85
RayCastMethod · 0.85

Calls 1

MakeB2Vec2Function · 0.85

Tested by

no test coverage detected