Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vittorioromeo committed May 6, 2024
1 parent 8fd76ed commit 25058bc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions include/SFML/System/Angle.inl
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ constexpr float positiveRemainder(float a, float b)
{
assert(b > 0.f && "Cannot calculate remainder with non-positive divisor");
const float val = a - static_cast<float>(static_cast<int>(a / b)) * b;
if (val >= 0.f)
return val;
else
return val + b;
return val >= 0.f ? val : val + b;
}
} // namespace priv

Expand Down Expand Up @@ -280,6 +277,6 @@ constexpr Angle operator""_rad(unsigned long long angle)
inline constexpr Angle Angle::Zero;
inline constexpr Angle Angle::QuarterCircle(radians(priv::pi / 2.f));
inline constexpr Angle Angle::HalfCircle(radians(priv::pi));
inline constexpr Angle Angle::FullCircle(radians(priv::pi * 2.f));
inline constexpr Angle Angle::FullCircle(radians(priv::tau));

} // namespace sf

0 comments on commit 25058bc

Please sign in to comment.