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

Function MakeB2RotFromAngle

CommonB2Math.go:371–376  ·  view source on GitHub ↗

Initialize from an angle in radians

(anglerad float64)

Source from the content-addressed store, hash-verified

369
370/// Initialize from an angle in radians
371func MakeB2RotFromAngle(anglerad float64) B2Rot {
372 return B2Rot{
373 S: math.Sin(anglerad),
374 C: math.Cos(anglerad),
375 }
376}
377
378func NewB2RotFromAngle(anglerad float64) *B2Rot {
379 res := MakeB2RotFromAngle(anglerad)

Calls

no outgoing calls

Tested by

no test coverage detected