Skip to content

Commit

Permalink
minor bug/doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zeddie888 committed Dec 26, 2023
1 parent fc664ef commit 1c6cabd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/attitude-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ decimal Vec3::operator*(const Vec3 &other) const {
return DECIMAL_FMA(x,other.x, DECIMAL_FMA(y,other.y, z*other.z));
}

/// Dot product
/// Vector-Scalar multiplication
Vec2 Vec2::operator*(const decimal &other) const {
return { x*other, y*other };
}
Expand All @@ -217,7 +217,7 @@ Vec2 Vec2::operator+(const Vec2 &other) const {
return {x + other.x, y + other.y };
}

/// Usual vector addition
/// Usual vector subtraction
Vec2 Vec2::operator-(const Vec2 &other) const {
return { x - other.x, y - other.y };
}
Expand Down
2 changes: 1 addition & 1 deletion src/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const Catalog &CatalogRead() {
std::sort(catalog.begin(), catalog.end(), [](const CatalogStar &a, const CatalogStar &b) {
return a.spatial.x < b.spatial.x;
});
for (int i = catalog.size(); i > 0; i--) {
for (int i = catalog.size()-1; i > 0; i--) {
if ((catalog[i].spatial - catalog[i-1].spatial).Magnitude() < DECIMAL(5e-5)) { // 70 stars removed at this threshold.
if (catalog[i].magnitude > catalog[i-1].magnitude) {
catalog.erase(catalog.begin() + i);
Expand Down

0 comments on commit 1c6cabd

Please sign in to comment.