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

Method OperatorIndexGet

CommonB2Math.go:70–76  ·  view source on GitHub ↗

Read from and indexed element.

(i int)

Source from the content-addressed store, hash-verified

68
69/// Read from and indexed element.
70func (v B2Vec2) OperatorIndexGet(i int) float64 {
71 if i == 0 {
72 return v.X
73 }
74
75 return v.Y
76}
77
78/// Write to an indexed element.
79func (v *B2Vec2) OperatorIndexSet(i int, value float64) {

Callers 1

RayCastMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected