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

@@ -262,7 +262,7 @@ namespace FlaxEngine.GUI
public override bool ContainsPoint(ref Float2 location, bool precise = false)
{
if (precise) // Precise check for checkbox element
return _box.Contains(ref location);
return _box.Contains(location);
return base.ContainsPoint(ref location, precise);
}
@@ -271,7 +271,7 @@ namespace FlaxEngine.GUI
{
base.OnMouseMove(location);
_mouseOverBox = _box.Contains(ref location);
_mouseOverBox = _box.Contains(location);
}
/// <inheritdoc />
@@ -298,7 +298,7 @@ namespace FlaxEngine.GUI
if (button == MouseButton.Left && _isPressed)
{
OnPressEnd();
if (_box.Contains(ref location))
if (_box.Contains(location))
{
OnClick();
return true;
@@ -313,7 +313,7 @@ namespace FlaxEngine.GUI
if (button == MouseButton.Left && _isPressed)
{
OnPressEnd();
if (_box.Contains(ref location))
if (_box.Contains(location))
{
OnClick();
return true;
@@ -351,7 +351,7 @@ namespace FlaxEngine.GUI
if (_isPressed)
{
OnPressEnd();
if (_box.Contains(ref location))
if (_box.Contains(location))
{
OnClick();
return true;

View File

@@ -113,7 +113,7 @@ namespace FlaxEngine.GUI
return true;
// Close on click outside the popup
if (!new Rectangle(Float2.Zero, Size).Contains(ref location))
if (!new Rectangle(Float2.Zero, Size).Contains(location))
{
Defocus();
return true;
@@ -129,7 +129,7 @@ namespace FlaxEngine.GUI
return true;
// Close on touch outside the popup
if (!new Rectangle(Float2.Zero, Size).Contains(ref location))
if (!new Rectangle(Float2.Zero, Size).Contains(location))
{
Defocus();
return true;

View File

@@ -340,7 +340,7 @@ namespace FlaxEngine.GUI
for (int i = 0; i < textBlocksCount; i++)
{
ref TextBlock textBlock = ref textBlocks[i];
if (textBlock.Bounds.Intersects(ref viewRect))
if (textBlock.Bounds.Intersects(viewRect))
{
firstTextBlock = i;
break;
@@ -350,7 +350,7 @@ namespace FlaxEngine.GUI
for (int i = textBlocksCount - 1; i > firstTextBlock; i--)
{
ref TextBlock textBlock = ref textBlocks[i];
if (textBlock.Bounds.Intersects(ref viewRect))
if (textBlock.Bounds.Intersects(viewRect))
{
endTextBlock = i + 1;
break;

View File

@@ -416,7 +416,7 @@ public class Slider : ContainerControl
Focus();
float mousePosition = Direction is SliderDirection.HorizontalRight or SliderDirection.HorizontalLeft ? location.X : location.Y;
if (_thumbRect.Contains(ref location))
if (_thumbRect.Contains(location))
{
// Start sliding
_isSliding = true;

View File

@@ -332,7 +332,7 @@ namespace FlaxEngine.GUI
set
{
value = Float2.Round(value);
if (Float2.NearEqual(ref value, ref _targetViewOffset))
if (Float2.NearEqual(value, _targetViewOffset))
return;
_targetViewOffset = _viewOffset = value;
OnTargetViewOffsetChanged();