Give explicit precedence with parentheses

This commit is contained in:
Oliver Booth 2022-11-30 18:09:41 +00:00
parent b4deeaf92c
commit 02b4907c95
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
4 changed files with 10 additions and 10 deletions

View File

@ -118,7 +118,7 @@ public sealed class VirtualParadiseAvatar : IEquatable<VirtualParadiseAvatar>
/// <inheritdoc />
public override bool Equals(object? obj)
{
return ReferenceEquals(this, obj) || obj is VirtualParadiseAvatar other && Equals(other);
return ReferenceEquals(this, obj) || (obj is VirtualParadiseAvatar other && Equals(other));
}
/// <inheritdoc />

View File

@ -109,7 +109,7 @@ public sealed class VirtualParadiseUser : IEquatable<VirtualParadiseUser>
/// <inheritdoc />
public override bool Equals(object? obj)
{
return ReferenceEquals(this, obj) || obj is VirtualParadiseUser other && Equals(other);
return ReferenceEquals(this, obj) || (obj is VirtualParadiseUser other && Equals(other));
}
/// <inheritdoc />

View File

@ -1,4 +1,4 @@
using System.Drawing;
using System.Drawing;
namespace VpSharp.Entities;
@ -105,7 +105,7 @@ public sealed class VirtualParadiseWorld : IEquatable<VirtualParadiseWorld>
/// <inheritdoc />
public override bool Equals(object? obj)
{
return ReferenceEquals(this, obj) || obj is VirtualParadiseWorld other && Equals(other);
return ReferenceEquals(this, obj) || (obj is VirtualParadiseWorld other && Equals(other));
}
/// <inheritdoc />

View File

@ -305,10 +305,10 @@ public struct Vector3d : IEquatable<Vector3d>, IFormattable
/// <returns>The cross product.</returns>
public static Vector3d Cross(Vector3d left, Vector3d right)
{
return new(
left.Y * right.Z - left.Z * right.Y,
left.Z * right.X - left.X * right.Z,
left.X * right.Y - left.Y * right.X
return new Vector3d(
(left.Y * right.Z) - (left.Z * right.Y),
(left.Z * right.X) - (left.X * right.Z),
(left.X * right.Y) - (left.Y * right.X)
);
}
@ -383,7 +383,7 @@ public struct Vector3d : IEquatable<Vector3d>, IFormattable
/// <returns>The maximized vector.</returns>
public static Vector3d Max(Vector3d left, Vector3d right)
{
return new(
return new Vector3d(
Math.Max(left.X, right.X),
Math.Max(left.Y, right.Y),
Math.Max(left.Z, right.Z)
@ -398,7 +398,7 @@ public struct Vector3d : IEquatable<Vector3d>, IFormattable
/// <returns>The minimized vector.</returns>
public static Vector3d Min(Vector3d left, Vector3d right)
{
return new(
return new Vector3d(
Math.Min(left.X, right.X),
Math.Min(left.Y, right.Y),
Math.Min(left.Z, right.Z)