mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- Fix bad return in scaletozero()
from 924b601199
.
This commit is contained in:
parent
0d6ffa5863
commit
1938efabe6
1 changed files with 5 additions and 6 deletions
|
@ -73,13 +73,12 @@ static inline DAngle getscaledangle(const DAngle angle, const double scale, cons
|
||||||
|
|
||||||
static inline bool scaletozero(DAngle& angle, const double scale, const DAngle push = DAngle::fromDeg(32. / 465.))
|
static inline bool scaletozero(DAngle& angle, const double scale, const DAngle push = DAngle::fromDeg(32. / 465.))
|
||||||
{
|
{
|
||||||
if (auto sgn = angle.Sgn())
|
auto sgn = angle.Sgn();
|
||||||
|
|
||||||
|
if (!sgn || sgn != (angle -= getscaledangle(angle, scale, push * sgn)).Sgn())
|
||||||
{
|
{
|
||||||
if (sgn != (angle -= getscaledangle(angle, scale, push * sgn)).Sgn())
|
angle = nullAngle;
|
||||||
{
|
return true;
|
||||||
angle = nullAngle;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue