mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 20:14:37 +00:00
common shape: code refactoring
don't convert data type(float-double) during computation.
This commit is contained in:
parent
d3bd55dbc7
commit
9cb256f473
1 changed files with 2 additions and 2 deletions
|
@ -160,8 +160,8 @@ Result Shape::appendArc(float cx, float cy, float radius, float startAngle, floa
|
|||
|
||||
auto nCurves = ceil(abs(sweep / M_PI_HALF));
|
||||
auto sweepSign = (sweep < 0 ? -1 : 1);
|
||||
auto fract = fmod(sweep, M_PI_HALF);
|
||||
fract = (abs(fract) < std::numeric_limits<float>::epsilon()) ? M_PI_HALF : fract;
|
||||
auto fract = fmodf(sweep, M_PI_HALF);
|
||||
fract = (fabsf(fract) < std::numeric_limits<float>::epsilon()) ? M_PI_HALF : fract;
|
||||
|
||||
//Start from here
|
||||
Point start = {radius * cos(startAngle), radius * sin(startAngle)};
|
||||
|
|
Loading…
Add table
Reference in a new issue