MCPcopy Create free account
hub / github.com/LibreCAD/LibreCAD / getRandomAngle

Function getRandomAngle

librecad/src/lib/engine/lc_looputils.cpp:77–81  ·  view source on GitHub ↗

------------------------------------------------------------------------------------- // a random angle between 0 and 2 pi

Source from the content-addressed store, hash-verified

75// ------------------------------------------------------------------------------------- //
76// a random angle between 0 and 2 pi
77double getRandomAngle() {
78 static std::uniform_real_distribution<double> uniformDistribution(0.0,
79 2. * M_PI);
80 return uniformDistribution(randomEngine);
81}
82
83// the closest distance from a point to the end points of an entity
84double getEndPointDistance(const RS_Vector& point, const RS_Entity& entity)

Callers 3

getInternalPointFunction · 0.85
getRandomRayFunction · 0.85
findFirstMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected