MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GenerateDirection2D

Function GenerateDirection2D

TombEngine/Math/Random.cpp:59–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 Vector2 GenerateDirection2D()
60 {
61 float angle = GenerateFloat(0.0f, PI_MUL_2); // Generate angle in full circle.
62 return Vector2(cos(angle), sin(angle));
63 }
64
65 Vector2 GeneratePoint2DInSquare(const Vector2& pos, short orient, float apothem)
66 {

Callers 1

SpawnMeteorParticlesMethod · 0.85

Calls 2

GenerateFloatFunction · 0.85
Vector2Function · 0.50

Tested by

no test coverage detected