MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / eccentricity

Method eccentricity

libraries/ellipse/ellipse.cpp:79–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79float ellipse::eccentricity()
80{
81 if (_a == _b) return 0; // quick circle check.
82 float x = _a * _a - _b * _b;
83 if (x < 0) x = -1 * x;
84 return sqrt(x)/ _a;
85}
86
87
88bool ellipse::isCircle(float epsilon)

Callers 1

unittestFunction · 0.80

Calls 1

sqrtFunction · 0.85

Tested by 1

unittestFunction · 0.64