Skip to content

Commit

Permalink
Fix double to float type conversion error (#46447)
Browse files Browse the repository at this point in the history
Summary:
![image](https://github.com/user-attachments/assets/3808e1ec-7b56-4cc6-85fb-a48beceba519)

## Changelog:
[GENERAL] [FIXED] - Fix type conversion error in react native windows build.

Pull Request resolved: #46447

Test Plan: RNW CI builds.

Reviewed By: cipolleschi

Differential Revision: D62570270

Pulled By: cortinico

fbshipit-source-id: da3da297ba10cdd41f49e754ce52053055d61644
  • Loading branch information
marlenecota authored and facebook-github-bot committed Sep 12, 2024
1 parent 81e8c39 commit 13db1cb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ ShadowNode::Shared LayoutableShadowNode::findNodeAtPoint(
auto centerY =
transformedFrame.origin.y + transformedFrame.size.height / 2.0;

auto relativeX = float(point.x - centerX);
auto relativeY = float(point.y - centerY);
auto relativeX = point.x - centerX;
auto relativeY = point.y - centerY;

if (Transform::isVerticalInversion(transform)) {
relativeY = -relativeY;
Expand All @@ -289,8 +289,8 @@ ShadowNode::Shared LayoutableShadowNode::findNodeAtPoint(
relativeX = -relativeX;
}

point.x = centerX + relativeX;
point.y = centerY + relativeY;
point.x = float(centerX + relativeX);
point.y = float(centerY + relativeY);
}

auto newPoint = point - transformedFrame.origin -
Expand Down

0 comments on commit 13db1cb

Please sign in to comment.