Minor code cleanups.

This commit is contained in:
Kyle Isom 2023-10-20 16:13:49 -07:00
parent 2fceae91fd
commit 68ed5e0aca
2 changed files with 2 additions and 5 deletions

View File

@ -136,10 +136,7 @@ public:
UpdateAngularOrientation(const scmp::geom::Vector<T, 3> &gyro, T delta)
{
// Ensure the delta isn't zero within a 100 μs
// tolerance. The assert helps to catch bugs in
// testing, but otherwise we should refused to do
// anything.
assert(!scmp::WithinTolerance<T>(delta, 0.0, 0.0001));
// tolerance.
if (scmp::WithinTolerance<T>(delta, 0.0, 0.00001)) {
return;
}

View File

@ -55,7 +55,7 @@ BestDie(int k, int m, int n)
auto dice = Die(m, n);
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));
}