Minor code cleanups.
This commit is contained in:
parent
2fceae91fd
commit
68ed5e0aca
|
@ -136,10 +136,7 @@ public:
|
||||||
UpdateAngularOrientation(const scmp::geom::Vector<T, 3> &gyro, T delta)
|
UpdateAngularOrientation(const scmp::geom::Vector<T, 3> &gyro, T delta)
|
||||||
{
|
{
|
||||||
// Ensure the delta isn't zero within a 100 μs
|
// Ensure the delta isn't zero within a 100 μs
|
||||||
// tolerance. The assert helps to catch bugs in
|
// tolerance.
|
||||||
// testing, but otherwise we should refused to do
|
|
||||||
// anything.
|
|
||||||
assert(!scmp::WithinTolerance<T>(delta, 0.0, 0.0001));
|
|
||||||
if (scmp::WithinTolerance<T>(delta, 0.0, 0.00001)) {
|
if (scmp::WithinTolerance<T>(delta, 0.0, 0.00001)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ BestDie(int k, int m, int n)
|
||||||
auto dice = Die(m, n);
|
auto dice = Die(m, n);
|
||||||
|
|
||||||
if (k < m) {
|
if (k < m) {
|
||||||
std::sort(dice.begin(), dice.end(), std::greater<int>());
|
std::sort(dice.begin(), dice.end(), std::greater<>());
|
||||||
dice.resize(static_cast<size_t>(k));
|
dice.resize(static_cast<size_t>(k));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue