mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -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;
|
return compare_result;
|
||||||
}
|
}
|
||||||
for (int i=0; i<2; i++) {
|
for (int i=0; i<2; i++) {
|
||||||
compare_result = _level[i] - ta->_level[i];
|
if (_level[i] != ta->_level[i]) {
|
||||||
if (compare_result!=0) {
|
return (_level[i] < ta->_level[i]) ? -1 : 1;
|
||||||
return compare_result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<2; i++) {
|
for (int i=0; i<2; i++) {
|
||||||
compare_result = _threshold[i] - ta->_threshold[i];
|
if (_threshold[i] != ta->_threshold[i]) {
|
||||||
if (compare_result!=0) {
|
return (_threshold[i] < ta->_threshold[i]) ? -1 : 1;
|
||||||
return compare_result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user