MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / to_positive_radian

Function to_positive_radian

source/matplot/util/common.cpp:412–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410 }
411
412 double to_positive_radian(double radian) {
413 radian = std::fmod(radian, pi * 2.);
414 while (radian < 0) {
415 // pretty sure this comparison is valid for doubles and floats
416 radian += pi * 2.;
417 }
418 return radian;
419 }
420
421 double vector_radians(double x, double y) {
422 return to_positive_radian(atan2(y, x));

Callers 2

polarhistogramMethod · 0.85
vector_radiansFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected