Fix double to float type conversion error (#46447)

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: https://github.com/facebook/react-native/pull/46447

Test Plan: RNW CI builds.

Reviewed By: cipolleschi

Differential Revision: D62570270

Pulled By: cortinico

fbshipit-source-id: da3da297ba10cdd41f49e754ce52053055d61644
This commit is contained in:
Marlene Cota
2024-09-12 07:27:52 -07:00
committed by Facebook GitHub Bot
parent 81e8c39f0a
commit 13db1cb88b
@@ -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;
@@ -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 -