Skip to content

Commit

Permalink
handle rotate inversion
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Jul 24, 2024
1 parent d24c221 commit b064d65
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <glog/logging.h>
#include <react/debug/react_native_assert.h>
#include <react/utils/FloatComparison.h>

namespace facebook::react {

Expand Down Expand Up @@ -305,11 +306,11 @@ Transform Transform::Interpolate(
}

bool Transform::isVerticalInversion(const Transform& transform) {
return transform.at(1, 1) == -1;
return facebook::react::floatEquality(transform.at(1, 1), -1.0f);
}

bool Transform::isHorizontalInversion(const Transform& transform) {
return transform.at(0, 0) == -1;
return facebook::react::floatEquality(transform.at(0, 0), -1.0f);
}

bool Transform::operator==(const Transform& rhs) const {
Expand Down

0 comments on commit b064d65

Please sign in to comment.