mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
A define mistake, fixed Under 2021 support. (#3276)
There is no HashCode.Combine in this function, so 2021 define is not needed. Removing the define brings back support for under Unity 2021's
This commit is contained in:
parent
eaf16608ca
commit
ca33b91460
@ -48,9 +48,6 @@ public Vector3Long(long x, long y, long z)
|
|||||||
public static Vector3Long operator *(long n, Vector3Long a) =>
|
public static Vector3Long operator *(long n, Vector3Long a) =>
|
||||||
new Vector3Long(a.x * n, a.y * n, a.z * n);
|
new Vector3Long(a.x * n, a.y * n, a.z * n);
|
||||||
|
|
||||||
// Unity 2019/2020 don't have HashCode.Combine yet.
|
|
||||||
// this is only to avoid reflection. without defining, it works too.
|
|
||||||
#if UNITY_2021_3_OR_NEWER
|
|
||||||
// == returns true if approximately equal (with epsilon).
|
// == returns true if approximately equal (with epsilon).
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static bool operator ==(Vector3Long a, Vector3Long b) =>
|
public static bool operator ==(Vector3Long a, Vector3Long b) =>
|
||||||
@ -60,7 +57,6 @@ public Vector3Long(long x, long y, long z)
|
|||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static bool operator !=(Vector3Long a, Vector3Long b) => !(a == b);
|
public static bool operator !=(Vector3Long a, Vector3Long b) => !(a == b);
|
||||||
#endif
|
|
||||||
|
|
||||||
// NO IMPLICIT System.Numerics.Vector3Long conversion because double<->float
|
// NO IMPLICIT System.Numerics.Vector3Long conversion because double<->float
|
||||||
// would silently lose precision in large worlds.
|
// would silently lose precision in large worlds.
|
||||||
|
Loading…
Reference in New Issue
Block a user