mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
common: code refactoring.
return as soon as possible. Change-Id: If48e13e8976bc1692dadd9054b484bf7cd811917
This commit is contained in:
parent
e98988da02
commit
7106272d97
1 changed files with 3 additions and 3 deletions
|
@ -152,13 +152,13 @@ Result Shape::appendCircle(float cx, float cy, float rx, float ry) noexcept
|
|||
|
||||
Result Shape::appendArc(float cx, float cy, float radius, float startAngle, float sweep, bool pie) noexcept
|
||||
{
|
||||
const float M_PI_HALF = M_PI / 2.0;
|
||||
|
||||
auto impl = pImpl.get();
|
||||
const float M_PI_HALF = M_PI * 0.5f;
|
||||
|
||||
//just circle
|
||||
if (sweep >= 360) return appendCircle(cx, cy, radius, radius);
|
||||
|
||||
auto impl = pImpl.get();
|
||||
|
||||
startAngle = (startAngle * M_PI) / 180;
|
||||
sweep = sweep * M_PI / 180;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue