/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return -1;
else if (r.sign_ > s.sign_)
return 1;
- else if (r.is_infinity ())
+ else if (r.is_infinity ()) // here s is also infinite with the same sign
return 0;
- else if (r.sign_ == 0)
+ else if (r.sign_ == 0) // here s.sign_ is also zero
return 0;
- return r.sign_ * ::sign ((I64) (r.num_ * s.den_) - (I64) (s.num_ * r.den_));
+ return ::sign (r - s);
}
int