mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
Fixed precision loss in compare_impl
This commit is contained in:
parent
a0f740720d
commit
9b27b21358
@ -240,15 +240,13 @@ compare_to_impl(const RenderAttrib *other) const {
|
||||
return compare_result;
|
||||
}
|
||||
for (int i=0; i<2; i++) {
|
||||
compare_result = _level[i] - ta->_level[i];
|
||||
if (compare_result!=0) {
|
||||
return compare_result;
|
||||
if (_level[i] != ta->_level[i]) {
|
||||
return (_level[i] < ta->_level[i]) ? -1 : 1;
|
||||
}
|
||||
}
|
||||
for (int i=0; i<2; i++) {
|
||||
compare_result = _threshold[i] - ta->_threshold[i];
|
||||
if (compare_result!=0) {
|
||||
return compare_result;
|
||||
if (_threshold[i] != ta->_threshold[i]) {
|
||||
return (_threshold[i] < ta->_threshold[i]) ? -1 : 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user