Use in over ref modifier in Math functions input parameters
This commit is contained in:
@@ -253,7 +253,7 @@ namespace FlaxEngine.GUI
|
||||
/// <inheritdoc />
|
||||
public override bool OnTestTooltipOverControl(ref Float2 location)
|
||||
{
|
||||
return HeaderRectangle.Contains(ref location);
|
||||
return HeaderRectangle.Contains(location);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -449,9 +449,9 @@ namespace FlaxEngine.GUI
|
||||
var child = _children[i];
|
||||
if (child.IsScrollable && child.Visible)
|
||||
{
|
||||
Matrix3x3.Multiply(ref child._cachedTransform, ref globalTransform, out var globalChildTransform);
|
||||
Matrix3x3.Multiply(child._cachedTransform, globalTransform, out var globalChildTransform);
|
||||
var childGlobalRect = new Rectangle(globalChildTransform.M31, globalChildTransform.M32, child.Width * globalChildTransform.M11, child.Height * globalChildTransform.M22);
|
||||
if (globalClipping.Intersects(ref childGlobalRect))
|
||||
if (globalClipping.Intersects(childGlobalRect))
|
||||
{
|
||||
Render2D.PushTransform(child._cachedTransform);
|
||||
child.Draw();
|
||||
|
||||
@@ -637,14 +637,14 @@ namespace FlaxEngine.GUI
|
||||
{
|
||||
var upperLeft = Float2.Zero;
|
||||
var bottomRight = c.Size;
|
||||
Matrix3x3.Transform2D(ref upperLeft, ref c._cachedTransform, out upperLeft);
|
||||
Matrix3x3.Transform2D(ref bottomRight, ref c._cachedTransform, out bottomRight);
|
||||
Float2.Min(ref upperLeft, ref bottomRight, out var min);
|
||||
Float2.Max(ref upperLeft, ref bottomRight, out var max);
|
||||
Matrix3x3.Transform2D(upperLeft, c._cachedTransform, out upperLeft);
|
||||
Matrix3x3.Transform2D(bottomRight, c._cachedTransform, out bottomRight);
|
||||
Float2.Min(upperLeft, bottomRight, out var min);
|
||||
Float2.Max(upperLeft, bottomRight, out var max);
|
||||
if (hasTotal)
|
||||
{
|
||||
Float2.Min(ref min, ref totalMin, out totalMin);
|
||||
Float2.Max(ref max, ref totalMax, out totalMax);
|
||||
Float2.Min(min, totalMin, out totalMin);
|
||||
Float2.Max(max, totalMax, out totalMax);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -697,11 +697,11 @@ namespace FlaxEngine.GUI
|
||||
|
||||
if (VScrollBar != null && VScrollBar.Enabled && height > MinSize)
|
||||
{
|
||||
if (new Rectangle(0, 0, width, AreaSize).Contains(ref location))
|
||||
if (new Rectangle(0, 0, width, AreaSize).Contains(location))
|
||||
{
|
||||
viewOffset.Y -= MoveScale;
|
||||
}
|
||||
else if (new Rectangle(0, height - AreaSize, width, AreaSize).Contains(ref location))
|
||||
else if (new Rectangle(0, height - AreaSize, width, AreaSize).Contains(location))
|
||||
{
|
||||
viewOffset.Y += MoveScale;
|
||||
}
|
||||
@@ -712,11 +712,11 @@ namespace FlaxEngine.GUI
|
||||
|
||||
if (HScrollBar != null && HScrollBar.Enabled && width > MinSize)
|
||||
{
|
||||
if (new Rectangle(0, 0, AreaSize, height).Contains(ref location))
|
||||
if (new Rectangle(0, 0, AreaSize, height).Contains(location))
|
||||
{
|
||||
viewOffset.X -= MoveScale;
|
||||
}
|
||||
else if (new Rectangle(width - AreaSize, 0, AreaSize, height).Contains(ref location))
|
||||
else if (new Rectangle(width - AreaSize, 0, AreaSize, height).Contains(location))
|
||||
{
|
||||
viewOffset.X += MoveScale;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace FlaxEngine.GUI
|
||||
get => _offset;
|
||||
set
|
||||
{
|
||||
if (!Float2.NearEqual(ref _offset, ref value))
|
||||
if (!Float2.NearEqual(_offset, value))
|
||||
{
|
||||
_offset = value;
|
||||
PerformLayout();
|
||||
|
||||
@@ -449,7 +449,7 @@ namespace FlaxEngine.GUI
|
||||
|
||||
float mousePosition = _orientation == Orientation.Vertical ? location.Y : location.X;
|
||||
|
||||
if (_thumbRect.Contains(ref location))
|
||||
if (_thumbRect.Contains(location))
|
||||
{
|
||||
// Start moving thumb
|
||||
_thumbClicked = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace FlaxEngine.GUI
|
||||
{
|
||||
if (value.MinValue <= 0.0f)
|
||||
throw new ArgumentException("Tiles cannot have negative size.");
|
||||
if (!Float2.Equals(ref _tileSize, ref value))
|
||||
if (!Float2.Equals(_tileSize, value))
|
||||
{
|
||||
_tileSize = value;
|
||||
PerformLayout();
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace FlaxEngine.GUI
|
||||
get => _slotSpacing;
|
||||
set
|
||||
{
|
||||
if (!Float2.NearEqual(ref _slotSpacing, ref value))
|
||||
if (!Float2.NearEqual(_slotSpacing, value))
|
||||
{
|
||||
_slotSpacing = value;
|
||||
PerformLayout();
|
||||
|
||||
Reference in New Issue
Block a user