Use in over ref modifier in Math functions input parameters

This commit is contained in:
2025-12-06 23:32:47 +02:00
parent ecf074801f
commit bc4b94d2bc
136 changed files with 1824 additions and 1824 deletions

View File

@@ -58,15 +58,15 @@ namespace FlaxEngine.GUI
_canvas.GetWorldMatrix(out var world);
Matrix.Translation((float)bounds.Extents.X, (float)bounds.Extents.Y, 0, out var offset);
Matrix.Multiply(ref offset, ref world, out var boxWorld);
Matrix.Multiply(offset, world, out var boxWorld);
boxWorld.Decompose(out bounds.Transformation);
// Hit test
if (bounds.Intersects(ref ray, out Vector3 hitPoint))
if (bounds.Intersects(ray, out Vector3 hitPoint))
{
// Transform world-space hit point to canvas local-space
world.Invert();
Vector3.Transform(ref hitPoint, ref world, out Vector3 localHitPoint);
Vector3.Transform(hitPoint, world, out Vector3 localHitPoint);
canvasLocation = new Float2(localHitPoint);
return ContainsPoint(ref canvasLocation, precise);
@@ -169,7 +169,7 @@ namespace FlaxEngine.GUI
// Transform canvas local-space point to the game root location
_canvas.GetWorldMatrix(out Matrix world);
Vector3 locationCanvasSpace = new Vector3(location, 0.0f);
Vector3.Transform(ref locationCanvasSpace, ref world, out Vector3 locationWorldSpace);
Vector3.Transform(locationCanvasSpace, world, out Vector3 locationWorldSpace);
camera.ProjectPoint(locationWorldSpace, out location);
return location;
}