mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-29 15:32:38 +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,14 +73,13 @@ 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.))
|
||||
{
|
||||
if (auto sgn = angle.Sgn())
|
||||
{
|
||||
if (sgn != (angle -= getscaledangle(angle, scale, push * sgn)).Sgn())
|
||||
auto sgn = angle.Sgn();
|
||||
|
||||
if (!sgn || sgn != (angle -= getscaledangle(angle, scale, push * sgn)).Sgn())
|
||||
{
|
||||
angle = nullAngle;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue