Skip to content

Commit

Permalink
Use ASSERT_FLOAT_EQ in TestPixelNormalizedCoordinatesConversion
Browse files Browse the repository at this point in the history
Reviewed By: mlopezantequera

Differential Revision: D48805944

fbshipit-source-id: 1c293ca367202740fc4e96011efb66bd8df0b119
  • Loading branch information
True Price authored and facebook-github-bot committed Aug 30, 2023
1 parent 899575a commit c798da1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opensfm/src/geometry/test/camera_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ TEST(Camera, TestPixelNormalizedCoordinatesConversion) {
ASSERT_EQ(norm_coord_comp[1],
(px_coord_def[1] - (height - 1) / 2.0) * inv_normalizer);
const Vec2d px_coord_comp = cam.NormalizedToPixelCoordinates(norm_coord_comp);
ASSERT_EQ(px_coord_comp, px_coord_def);
ASSERT_FLOAT_EQ(px_coord_comp[0], px_coord_def[0]);
ASSERT_FLOAT_EQ(px_coord_comp[1], px_coord_def[1]);

const Vec2d norm_coord_static =
geometry::Camera::PixelToNormalizedCoordinates(px_coord_def, width,
Expand Down

0 comments on commit c798da1

Please sign in to comment.