Skip to content

Commit

Permalink
Sanity check std::clamp
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettSJohnson committed Jan 30, 2024
1 parent 5d6c52b commit d372816
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layer0/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,9 @@ void MapLocus(const MapType * I, const float *v, int *a, int *b, int *c)
bt = (int) ((v[1] - I->Min[1]) * invDiv) + MapBorder;
ct = (int) ((v[2] - I->Min[2]) * invDiv) + MapBorder;

*a = pymol::clamp(at, I->iMin[0], I->iMax[0]);
*b = pymol::clamp(bt, I->iMin[1], I->iMax[1]);
*c = pymol::clamp(ct, I->iMin[2], I->iMax[2]);
*a = std::clamp(at, I->iMin[0], I->iMax[0]);
*b = std::clamp(bt, I->iMin[1], I->iMax[1]);
*c = std::clamp(ct, I->iMin[2], I->iMax[2]);
}

/**
Expand Down

0 comments on commit d372816

Please sign in to comment.