< Summary

Information
Class: FixedMathSharp.Vector2d
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Numerics/Vector2d.cs
Line coverage
98%
Covered lines: 362
Uncovered lines: 4
Coverable lines: 366
Total lines: 1051
Line coverage: 98.9%
Branch coverage
100%
Covered branches: 32
Total branches: 32
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
.ctor(...)100%210%
.ctor(...)100%11100%
.ctor(...)100%11100%
get_RotatedRight()100%11100%
get_RotatedLeft()100%11100%
get_RightHandNormal()100%11100%
get_LeftHandNormal()100%11100%
get_Normal()100%11100%
get_Magnitude()100%11100%
get_SqrMagnitude()100%11100%
get_LongStateHash()100%11100%
get_StateHash()100%11100%
get_Item(...)100%44100%
set_Item(...)100%44100%
Set(...)100%11100%
AddInPlace(...)100%11100%
AddInPlace(...)100%11100%
AddInPlace(...)100%11100%
SubtractInPlace(...)100%11100%
SubtractInPlace(...)100%11100%
SubtractInPlace(...)100%11100%
ScaleInPlace(...)100%11100%
ScaleInPlace(...)100%11100%
Normalize()100%11100%
Normalize(...)100%44100%
LerpInPlace(...)100%11100%
LerpInPlace(...)100%44100%
Lerp(...)100%11100%
Lerped(...)100%11100%
RotateInPlace(...)100%11100%
Rotated(...)100%11100%
Rotated(...)100%11100%
RotateInverse(...)100%11100%
RotateRightInPlace()100%11100%
RotateLeftInPlace()100%11100%
ReflectInPlace(...)100%11100%
ReflectInPlace(...)100%11100%
ReflectInPlace(...)100%11100%
Reflected(...)100%11100%
Reflected(...)100%11100%
Dot(...)100%11100%
Dot(...)100%11100%
CrossProduct(...)100%11100%
CrossProduct(...)100%11100%
Distance(...)100%11100%
Distance(...)100%11100%
SqrDistance(...)100%11100%
SqrDistance(...)100%11100%
GetNormalized(...)100%44100%
GetMagnitude(...)100%66100%
Abs(...)100%11100%
Sign(...)100%11100%
CreateRotation(...)100%11100%
Distance(...)100%11100%
SqrDistance(...)100%11100%
ForwardDirection(...)100%11100%
Dot(...)100%11100%
Scale(...)100%11100%
CrossProduct(...)100%210%
Rotate(...)100%11100%
ToString()100%11100%
ToVector3d(...)100%11100%
Deconstruct(...)100%11100%
Deconstruct(...)100%11100%
ToDegrees(...)100%11100%
ToRadians(...)100%11100%
op_Addition(...)100%11100%
op_Addition(...)100%11100%
op_Addition(...)100%11100%
op_Addition(...)100%11100%
op_Addition(...)100%11100%
op_Addition(...)100%11100%
op_Addition(...)100%11100%
op_Subtraction(...)100%11100%
op_Subtraction(...)100%11100%
op_Subtraction(...)100%11100%
op_Subtraction(...)100%11100%
op_Subtraction(...)100%11100%
op_Subtraction(...)100%11100%
op_Subtraction(...)100%11100%
op_UnaryNegation(...)100%11100%
op_Multiply(...)100%11100%
op_Multiply(...)100%11100%
op_Division(...)100%11100%
op_Equality(...)100%11100%
op_Inequality(...)100%11100%
EqualsZero()100%11100%
NotZero()100%11100%
AllComponentsGreaterThanEpsilon()100%22100%
Equals(...)100%22100%
Equals(...)100%22100%
Equals(...)100%11100%
GetHashCode()100%11100%
GetHashCode(...)100%11100%
CompareTo(...)100%11100%

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Numerics/Vector2d.cs

#LineLine coverage
 1using MemoryPack;
 2using System;
 3using System.Collections.Generic;
 4using System.Runtime.CompilerServices;
 5using System.Text.Json.Serialization;
 6
 7namespace FixedMathSharp;
 8
 9/// <summary>
 10/// Represents a 2D vector with fixed-point precision, offering a range of mathematical operations
 11/// and transformations such as rotation, scaling, reflection, and interpolation.
 12/// </summary>
 13/// <remarks>
 14/// The Vector2d struct is designed for applications that require precise numerical operations,
 15/// such as games, simulations, or physics engines. It provides methods for common vector operations
 16/// like addition, subtraction, dot product, cross product, distance calculations, and rotation.
 17///
 18/// Use Cases:
 19/// - Modeling 2D positions, directions, and velocities in fixed-point math environments.
 20/// - Performing vector transformations, including rotations and reflections.
 21/// - Handling interpolation and distance calculations in physics or simulation systems.
 22/// - Useful for fixed-point math scenarios where floating-point precision is insufficient or not desired.
 23/// </remarks>
 24[Serializable]
 25[MemoryPackable]
 26public partial struct Vector2d : IEquatable<Vector2d>, IComparable<Vector2d>, IEqualityComparer<Vector2d>
 27{
 28    #region Static Readonly Fields
 29
 30    /// <summary>
 31    /// (1, 0)
 32    /// </summary>
 33    public static readonly Vector2d DefaultRotation = new Vector2d(1, 0);
 34
 35    /// <summary>
 36    /// (0, 1)
 37    /// </summary>
 38    public static readonly Vector2d Forward = new Vector2d(0, 1);
 39
 40    /// <summary>
 41    /// (1, 0)
 42    /// </summary>
 43    public static readonly Vector2d Right = new Vector2d(1, 0);
 44
 45    /// <summary>
 46    /// (0, -1)
 47    /// </summary>
 48    public static readonly Vector2d Down = new Vector2d(0, -1);
 49
 50    /// <summary>
 51    /// (-1, 0)
 52    /// </summary>
 53    public static readonly Vector2d Left = new Vector2d(-1, 0);
 54
 55    /// <summary>
 56    /// (1, 1)
 57    /// </summary>
 58    public static readonly Vector2d One = new Vector2d(1, 1);
 59
 60    /// <summary>
 61    /// (-1, -1)
 62    /// </summary>
 63    public static readonly Vector2d Negative = new Vector2d(-1, -1);
 64
 65    /// <summary>
 66    /// (0, 0)
 67    /// </summary>
 68    public static readonly Vector2d Zero = new Vector2d(0, 0);
 69
 70    #endregion
 71
 72    #region Fields
 73
 74    /// <summary>
 75    /// The X component of the vector.
 76    /// </summary>
 77    [JsonInclude]
 78    [MemoryPackOrder(0)]
 79    public Fixed64 x;
 80
 81    /// <summary>
 82    /// The Y component of the vector.
 83    /// </summary>
 84    [JsonInclude]
 85    [MemoryPackOrder(1)]
 86    public Fixed64 y;
 87
 88    #endregion
 89
 90    #region Constructors
 91
 39692    public Vector2d(int xInt, int yInt) : this((Fixed64)xInt, (Fixed64)yInt) { }
 93
 094    public Vector2d(float xFloat, float yFloat) : this((Fixed64)xFloat, (Fixed64)yFloat) { }
 95
 2196    public Vector2d(double xDoub, double yDoub) : this((Fixed64)xDoub, (Fixed64)yDoub) { }
 97
 98    [JsonConstructor]
 99    public Vector2d(Fixed64 x, Fixed64 y)
 199100    {
 199101        this.x = x;
 199102        this.y = y;
 199103    }
 104
 105    #endregion
 106
 107    #region Properties
 108
 109    /// <summary>
 110    /// Rotates the vector to the right (90 degrees clockwise).
 111    /// </summary>
 112    [JsonIgnore]
 113    [MemoryPackIgnore]
 114    public Vector2d RotatedRight
 115    {
 116        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1117        get => new Vector2d(y, -x);
 118    }
 119
 120    /// <summary>
 121    /// Rotates the vector to the left (90 degrees counterclockwise).
 122    /// </summary>
 123    [JsonIgnore]
 124    [MemoryPackIgnore]
 125    public Vector2d RotatedLeft
 126    {
 127        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1128        get => new Vector2d(-y, x);
 129    }
 130
 131    /// <summary>
 132    /// Gets the right-hand (counter-clockwise) normal vector.
 133    /// </summary>
 134    [JsonIgnore]
 135    [MemoryPackIgnore]
 136    public Vector2d RightHandNormal
 137    {
 138        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1139        get => new Vector2d(-y, x);
 140    }
 141
 142    /// <summary>
 143    /// Gets the left-hand (clockwise) normal vector.
 144    /// </summary>
 145    [JsonIgnore]
 146    [MemoryPackIgnore]
 147    public Vector2d LeftHandNormal
 148    {
 149        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1150        get => new Vector2d(y, -x);
 151    }
 152
 153    /// <inheritdoc cref="GetNormalized(Vector2d)"/>
 154    [JsonIgnore]
 155    [MemoryPackIgnore]
 156    public Vector2d Normal
 157    {
 158        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1159        get => GetNormalized(this);
 160    }
 161
 162    /// <summary>
 163    /// Returns the actual length of this vector (RO).
 164    /// </summary>
 165    [JsonIgnore]
 166    [MemoryPackIgnore]
 167    public Fixed64 Magnitude
 168    {
 169        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 15170        get => GetMagnitude(this);
 171    }
 172
 173    /// <summary>
 174    /// Returns the square magnitude of the vector (avoids calculating the square root).
 175    /// </summary>
 176    [JsonIgnore]
 177    [MemoryPackIgnore]
 178    public Fixed64 SqrMagnitude
 179    {
 180        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 4181        get => x * x + y * y;
 182    }
 183
 184    /// <summary>
 185    /// Returns a long hash of the vector based on its x and y values.
 186    /// </summary>
 187    [JsonIgnore]
 188    [MemoryPackIgnore]
 189    public long LongStateHash
 190    {
 191        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 7192        get => x.m_rawValue * 31 + y.m_rawValue * 7;
 193    }
 194
 195    /// <summary>
 196    /// Returns a hash of the vector based on its state.
 197    /// </summary>
 198    [JsonIgnore]
 199    [MemoryPackIgnore]
 200    public int StateHash
 201    {
 202        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 5203        get => (int)(LongStateHash % int.MaxValue);
 204    }
 205
 206    [JsonIgnore]
 207    [MemoryPackIgnore]
 208    public Fixed64 this[int index]
 209    {
 210        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 211        get
 4212        {
 4213            return index switch
 4214            {
 1215                0 => x,
 1216                1 => y,
 2217                _ => throw new IndexOutOfRangeException("Invalid Vector2d index!"),
 4218            };
 2219        }
 220        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 221        set
 4222        {
 4223            switch (index)
 224            {
 225                case 0:
 1226                    x = value;
 1227                    break;
 228                case 1:
 1229                    y = value;
 1230                    break;
 231                default:
 2232                    throw new IndexOutOfRangeException("Invalid Vector2d index!");
 233            }
 2234        }
 235    }
 236
 237    #endregion
 238
 239    #region Methods (Instance)
 240
 241    /// <summary>
 242    /// Set x, y and z components of an existing Vector3.
 243    /// </summary>
 244    /// <param name="newX"></param>
 245    /// <param name="newY"></param>
 246    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 247    public void Set(Fixed64 newX, Fixed64 newY)
 1248    {
 1249        x = newX;
 1250        y = newY;
 1251    }
 252
 253    /// <summary>
 254    /// Adds the specified values to the components of the vector in place and returns the modified vector.
 255    /// </summary>
 256    /// <param name="amount">The amount to add to the components.</param>
 257    /// <returns>The modified vector after addition.</returns>
 258    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 259    public Vector2d AddInPlace(Fixed64 amount)
 2260    {
 2261        x += amount;
 2262        y += amount;
 2263        return this;
 2264    }
 265
 266    /// <summary>
 267    /// Adds the specified values to the components of the vector in place and returns the modified vector.
 268    /// </summary>
 269    /// <param name="xAmount">The amount to add to the x component.</param>
 270    /// <param name="yAmount">The amount to add to the y component.</param>
 271    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 272    public Vector2d AddInPlace(Fixed64 xAmount, Fixed64 yAmount)
 2273    {
 2274        x += xAmount;
 2275        y += yAmount;
 2276        return this;
 2277    }
 278
 279    /// <inheritdoc cref="AddInPlace(Fixed64, Fixed64)"/>
 280    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 281    public Vector2d AddInPlace(Vector2d other)
 1282    {
 1283        AddInPlace(other.x, other.y);
 1284        return this;
 1285    }
 286
 287    /// <summary>
 288    /// Subtracts the specified value from all components of the vector in place and returns the modified vector.
 289    /// </summary>
 290    /// <param name="amount">The amount to subtract from each component.</param>
 291    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 292    public Vector2d SubtractInPlace(Fixed64 amount)
 2293    {
 2294        x -= amount;
 2295        y -= amount;
 2296        return this;
 2297    }
 298
 299    /// <summary>
 300    /// Subtracts the specified values from the components of the vector in place and returns the modified vector.
 301    /// </summary>
 302    /// <param name="xAmount">The amount to subtract from the x component.</param>
 303    /// <param name="yAmount">The amount to subtract from the y component.</param>
 304    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 305    public Vector2d SubtractInPlace(Fixed64 xAmount, Fixed64 yAmount)
 2306    {
 2307        x -= xAmount;
 2308        y -= yAmount;
 2309        return this;
 2310    }
 311
 312    /// <summary>
 313    /// Subtracts the specified vector from the components of the vector in place and returns the modified vector.
 314    /// </summary>
 315    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 316    public Vector2d SubtractInPlace(Vector2d other)
 1317    {
 1318        SubtractInPlace(other.x, other.y);
 1319        return this;
 1320    }
 321
 322    /// <summary>
 323    /// Scales the components of the vector by the specified scalar factor in place and returns the modified vector.
 324    /// </summary>
 325    /// <param name="scaleFactor">The scalar factor to multiply each component by.</param>
 326    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 327    public Vector2d ScaleInPlace(Fixed64 scaleFactor)
 1328    {
 1329        x *= scaleFactor;
 1330        y *= scaleFactor;
 1331        return this;
 1332    }
 333
 334    /// <summary>
 335    /// Scales each component of the vector by the corresponding component of the given vector in place and returns the 
 336    /// </summary>
 337    /// <param name="scale">The vector containing the scale factors for each component.</param>
 338    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 339    public Vector2d ScaleInPlace(Vector2d scale)
 1340    {
 1341        x *= scale.x;
 1342        y *= scale.y;
 1343        return this;
 1344    }
 345
 346    /// <summary>
 347    /// Normalizes this vector in place, making its magnitude (length) equal to 1, and returns the modified vector.
 348    /// </summary>
 349    /// <remarks>
 350    /// If the vector is zero-length or already normalized, no operation is performed.
 351    /// This method modifies the current vector in place and supports method chaining.
 352    /// </remarks>
 353    /// <returns>The normalized vector.</returns>
 354    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 355    public Vector2d Normalize()
 3356    {
 3357        return this = GetNormalized(this);
 3358    }
 359
 360    /// <summary>
 361    /// Normalizes this vector in place and outputs its original magnitude.
 362    /// </summary>
 363    /// <param name="mag">The original magnitude of the vector before normalization.</param>
 364    /// <remarks>
 365    /// If the vector is zero-length or already normalized, no operation is performed, but the original magnitude will s
 366    /// </remarks>
 367    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 368    public Vector2d Normalize(out Fixed64 mag)
 3369    {
 3370        mag = GetMagnitude(this);
 371
 372        // If magnitude is zero, return a zero vector to avoid divide-by-zero errors
 3373        if (mag == Fixed64.Zero)
 1374        {
 1375            x = Fixed64.Zero;
 1376            y = Fixed64.Zero;
 1377            return this;
 378        }
 379
 380        // If already normalized, return as-is
 2381        if (mag == Fixed64.One)
 1382            return this;
 383
 1384        x /= mag;
 1385        y /= mag;
 386
 1387        return this;
 3388    }
 389
 390    /// <summary>
 391    /// Linearly interpolates this vector toward the target vector by the specified amount.
 392    /// </summary>
 393    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 394    public Vector2d LerpInPlace(Vector2d target, Fixed64 amount)
 2395    {
 2396        LerpInPlace(target.x, target.y, amount);
 2397        return this;
 2398    }
 399
 400    /// <summary>
 401    /// Linearly interpolates this vector toward the target values by the specified amount.
 402    /// </summary>
 403    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 404    public Vector2d LerpInPlace(Fixed64 targetx, Fixed64 targety, Fixed64 amount)
 3405    {
 3406        if (amount >= Fixed64.One)
 1407        {
 1408            x = targetx;
 1409            y = targety;
 1410        }
 2411        else if (amount > Fixed64.Zero)
 2412        {
 2413            x = targetx * amount + x * (Fixed64.One - amount);
 2414            y = targety * amount + y * (Fixed64.One - amount);
 2415        }
 3416        return this;
 3417    }
 418
 419    /// <summary>
 420    /// Linearly interpolates between two vectors.
 421    /// </summary>
 422    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 423    public static Vector2d Lerp(Vector2d a, Vector2d b, Fixed64 amount)
 2424    {
 2425        amount = FixedMath.Clamp01(amount);
 2426        return new Vector2d(a.x + (b.x - a.x) * amount, a.y + (b.y - a.y) * amount);
 2427    }
 428
 429    /// <summary>
 430    /// Returns a new vector that is the result of linear interpolation toward the target by the specified amount.
 431    /// </summary>
 432    public Vector2d Lerped(Vector2d target, Fixed64 amount)
 1433    {
 1434        Vector2d vec = this;
 1435        vec.LerpInPlace(target.x, target.y, amount);
 1436        return vec;
 1437    }
 438
 439    /// <summary>
 440    /// Rotates this vector by the specified cosine and sine values (counter-clockwise).
 441    /// </summary>
 442    public Vector2d RotateInPlace(Fixed64 cos, Fixed64 sin)
 4443    {
 4444        Fixed64 temp1 = x * cos - y * sin;
 4445        y = x * sin + y * cos;
 4446        x = temp1;
 4447        return this;
 4448    }
 449
 450    /// <summary>
 451    /// Returns a new vector that is the result of rotating this vector by the specified cosine and sine values.
 452    /// </summary>
 453    public Vector2d Rotated(Fixed64 cos, Fixed64 sin)
 2454    {
 2455        Vector2d vec = this;
 2456        vec.RotateInPlace(cos, sin);
 2457        return vec;
 2458    }
 459
 460    /// <summary>
 461    /// Rotates this vector using another vector representing the cosine and sine of the rotation angle.
 462    /// </summary>
 463    /// <param name="rotation">The vector containing the cosine and sine values for rotation.</param>
 464    /// <returns>A new vector representing the result of the rotation.</returns>
 465    public Vector2d Rotated(Vector2d rotation)
 1466    {
 1467        return Rotated(rotation.x, rotation.y);
 1468    }
 469
 470    /// <summary>
 471    /// Rotates this vector in the inverse direction using cosine and sine values.
 472    /// </summary>
 473    /// <param name="cos">The cosine of the rotation angle.</param>
 474    /// <param name="sin">The sine of the rotation angle.</param>
 475    public void RotateInverse(Fixed64 cos, Fixed64 sin)
 1476    {
 1477        RotateInPlace(cos, -sin);
 1478    }
 479
 480    /// <summary>
 481    /// Rotates this vector 90 degrees to the right (clockwise).
 482    /// </summary>
 483    public Vector2d RotateRightInPlace()
 1484    {
 1485        Fixed64 temp1 = x;
 1486        x = y;
 1487        y = -temp1;
 1488        return this;
 1489    }
 490
 491    /// <summary>
 492    /// Rotates this vector 90 degrees to the left (counterclockwise).
 493    /// </summary>
 494    public Vector2d RotateLeftInPlace()
 1495    {
 1496        Fixed64 temp1 = x;
 1497        x = -y;
 1498        y = temp1;
 1499        return this;
 1500    }
 501
 502    /// <summary>
 503    /// Reflects this vector across the specified axis vector.
 504    /// </summary>
 505    public Vector2d ReflectInPlace(Vector2d axis)
 1506    {
 1507        return ReflectInPlace(axis.x, axis.y);
 1508    }
 509
 510    /// <summary>
 511    /// Reflects this vector across the specified x and y axis.
 512    /// </summary>
 513    public Vector2d ReflectInPlace(Fixed64 axisX, Fixed64 axisY)
 4514    {
 4515        Fixed64 projection = Dot(axisX, axisY);
 4516        return ReflectInPlace(axisX, axisY, projection);
 4517    }
 518
 519    /// <summary>
 520    /// Reflects this vector across the specified axis using the provided projection of this vector onto the axis.
 521    /// </summary>
 522    /// /// <param name="axisX">The x component of the axis to reflect across.</param>
 523    /// <param name="axisY">The y component of the axis to reflect across.</param>
 524    /// <param name="projection">The precomputed projection of this vector onto the reflection axis.</param>
 525    public Vector2d ReflectInPlace(Fixed64 axisX, Fixed64 axisY, Fixed64 projection)
 5526    {
 5527        Fixed64 temp1 = axisX * projection;
 5528        Fixed64 temp2 = axisY * projection;
 5529        x = temp1 + temp1 - x;
 5530        y = temp2 + temp2 - y;
 5531        return this;
 5532    }
 533
 534    /// <summary>
 535    /// Reflects this vector across the specified x and y axis.
 536    /// </summary>
 537    /// <returns>A new vector representing the result of the reflection.</returns>
 538    public Vector2d Reflected(Fixed64 axisX, Fixed64 axisY)
 2539    {
 2540        Vector2d vec = this;
 2541        vec.ReflectInPlace(axisX, axisY);
 2542        return vec;
 2543    }
 544
 545    /// <summary>
 546    /// Reflects this vector across the specified axis vector.
 547    /// </summary>
 548    /// <returns>A new vector representing the result of the reflection.</returns>
 549    public Vector2d Reflected(Vector2d axis)
 1550    {
 1551        return Reflected(axis.x, axis.y);
 1552    }
 553
 554    /// <summary>
 555    /// Returns the dot product of this vector with another vector.
 556    /// </summary>
 557    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 558    public Fixed64 Dot(Fixed64 otherX, Fixed64 otherY)
 7559    {
 7560        return x * otherX + y * otherY;
 7561    }
 562
 563    /// <summary>
 564    /// Returns the dot product of this vector with another vector.
 565    /// </summary>
 566    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 567    public Fixed64 Dot(Vector2d other)
 2568    {
 2569        return Dot(other.x, other.y);
 2570    }
 571
 572    /// <summary>
 573    /// Computes the cross product magnitude of this vector with another vector.
 574    /// </summary>
 575    /// <param name="otherX">The X component of the other vector.</param>
 576    /// <param name="otherY">The Y component of the other vector.</param>
 577    /// <returns>The cross product magnitude.</returns>
 578    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 579    public Fixed64 CrossProduct(Fixed64 otherX, Fixed64 otherY)
 1580    {
 1581        return x * otherY - y * otherX;
 1582    }
 583
 584    /// <inheritdoc cref="CrossProduct(Fixed64, Fixed64)"/>
 585    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 586    public Fixed64 CrossProduct(Vector2d other)
 1587    {
 1588        return CrossProduct(other.x, other.y);
 1589    }
 590
 591    /// <summary>
 592    /// Returns the distance between this vector and another vector specified by its components.
 593    /// </summary>
 594    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 595    public Fixed64 Distance(Fixed64 otherX, Fixed64 otherY)
 2596    {
 2597        Fixed64 temp1 = x - otherX;
 2598        temp1 *= temp1;
 2599        Fixed64 temp2 = y - otherY;
 2600        temp2 *= temp2;
 2601        return FixedMath.Sqrt(temp1 + temp2);
 2602    }
 603
 604    /// <summary>
 605    /// Returns the distance between this vector and another vector.
 606    /// </summary>
 607    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 608    public Fixed64 Distance(Vector2d other)
 2609    {
 2610        return Distance(other.x, other.y);
 2611    }
 612
 613    /// <summary>
 614    /// Calculates the squared distance between two vectors, avoiding the need for a square root operation.
 615    /// </summary>
 616    /// <returns>The squared distance between the two vectors.</returns>
 617    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 618    public Fixed64 SqrDistance(Fixed64 otherX, Fixed64 otherY)
 3619    {
 3620        Fixed64 temp1 = x - otherX;
 3621        temp1 *= temp1;
 3622        Fixed64 temp2 = y - otherY;
 3623        temp2 *= temp2;
 3624        return temp1 + temp2;
 3625    }
 626
 627    /// <summary>
 628    /// Calculates the squared distance between two vectors, avoiding the need for a square root operation.
 629    /// </summary>
 630    /// <returns>The squared distance between the two vectors.</returns>
 631    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 632    public Fixed64 SqrDistance(Vector2d other)
 3633    {
 3634        return SqrDistance(other.x, other.y);
 3635    }
 636
 637    #endregion
 638
 639    #region Vector2d Operations
 640
 641    /// <summary>
 642    /// Normalizes the given vector, returning a unit vector with the same direction.
 643    /// </summary>
 644    /// <param name="value">The vector to normalize.</param>
 645    /// <returns>A normalized (unit) vector with the same direction.</returns>
 646    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 647    public static Vector2d GetNormalized(Vector2d value)
 5648    {
 5649        Fixed64 mag = GetMagnitude(value);
 650
 5651        if (mag == Fixed64.Zero)
 1652            return new Vector2d(Fixed64.Zero, Fixed64.Zero);
 653
 654        // If already normalized, return as-is
 4655        if (mag == Fixed64.One)
 1656            return value;
 657
 658        // Normalize it exactly
 3659        return new Vector2d(
 3660            value.x / mag,
 3661            value.y / mag
 3662        );
 5663    }
 664
 665    /// <summary>
 666    /// Returns the magnitude (length) of the given vector.
 667    /// </summary>
 668    /// <param name="vector">The vector to compute the magnitude of.</param>
 669    /// <returns>The magnitude (length) of the vector.</returns>
 670    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 671    public static Fixed64 GetMagnitude(Vector2d vector)
 24672    {
 24673        Fixed64 mag = (vector.x * vector.x) + (vector.y * vector.y);
 674
 675        // If rounding error pushed magnitude slightly above 1, clamp it
 24676        if (mag > Fixed64.One && mag <= Fixed64.One + Fixed64.Epsilon)
 3677            return Fixed64.One;
 678
 21679        return mag.Abs() > Fixed64.Zero ? FixedMath.Sqrt(mag) : Fixed64.Zero;
 24680    }
 681
 682    /// <summary>
 683    /// Returns a new <see cref="Vector2d"/> where each component is the absolute value of the corresponding input compo
 684    /// </summary>
 685    /// <param name="value">The input vector.</param>
 686    /// <returns>A vector with absolute values for each component.</returns>
 687    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 688    public static Vector2d Abs(Vector2d value)
 1689    {
 1690        return new Vector2d(value.x.Abs(), value.y.Abs());
 1691    }
 692
 693    /// <summary>
 694    /// Returns a new <see cref="Vector2d"/> where each component is the sign of the corresponding input component.
 695    /// </summary>
 696    /// <param name="value">The input vector.</param>
 697    /// <returns>A vector where each component is -1, 0, or 1 based on the sign of the input.</returns>
 698    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 699    public static Vector2d Sign(Vector2d value)
 1700    {
 1701        return new Vector2d(value.x.Sign(), value.y.Sign());
 1702    }
 703
 704    /// <summary>
 705    /// Creates a vector from a given angle in radians.
 706    /// </summary>
 707    public static Vector2d CreateRotation(Fixed64 angle)
 1708    {
 1709        return new Vector2d(FixedMath.Cos(angle), FixedMath.Sin(angle));
 1710    }
 711
 712    /// <summary>
 713    /// Computes the distance between two vectors using the Euclidean distance formula.
 714    /// </summary>
 715    /// <param name="start">The starting vector.</param>
 716    /// <param name="end">The ending vector.</param>
 717    /// <returns>The Euclidean distance between the two vectors.</returns>
 718    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 719    public static Fixed64 Distance(Vector2d start, Vector2d end)
 1720    {
 1721        return start.Distance(end);
 1722    }
 723
 724    /// <summary>
 725    /// Calculates the squared distance between two vectors, avoiding the need for a square root operation.
 726    /// </summary>
 727    /// <returns>The squared distance between the two vectors.</returns>
 728    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 729    public static Fixed64 SqrDistance(Vector2d start, Vector2d end)
 1730    {
 1731        return start.SqrDistance(end);
 1732    }
 733
 734    /// <summary>
 735    /// Calculates the forward direction vector in 2D based on a yaw (angle).
 736    /// </summary>
 737    /// <param name="angle">The angle in radians representing the rotation in 2D space.</param>
 738    /// <returns>A unit vector representing the forward direction.</returns>
 739    public static Vector2d ForwardDirection(Fixed64 angle)
 1740    {
 1741        Fixed64 x = FixedMath.Cos(angle); // Forward in the x-direction
 1742        Fixed64 y = FixedMath.Sin(angle); // Forward in the y-direction
 1743        return new Vector2d(x, y);
 1744    }
 745
 746    /// <summary>
 747    /// Dot Product of two vectors.
 748    /// </summary>
 749    /// <param name="lhs"></param>
 750    /// <param name="rhs"></param>
 751    /// <returns></returns>
 752    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 753    public static Fixed64 Dot(Vector2d lhs, Vector2d rhs)
 1754    {
 1755        return lhs.Dot(rhs.x, rhs.y);
 1756    }
 757
 758    /// <summary>
 759    /// Multiplies two vectors component-wise.
 760    /// </summary>
 761    /// <param name="a"></param>
 762    /// <param name="b"></param>
 763    /// <returns></returns>
 764    public static Vector2d Scale(Vector2d a, Vector2d b)
 1765    {
 1766        return new Vector2d(a.x * b.x, a.y * b.y);
 1767    }
 768
 769    /// <summary>
 770    /// Cross Product of two vectors.
 771    /// </summary>
 772    /// <param name="lhs"></param>
 773    /// <param name="rhs"></param>
 774    /// <returns></returns>
 775    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 776    public static Fixed64 CrossProduct(Vector2d lhs, Vector2d rhs)
 0777    {
 0778        return lhs.CrossProduct(rhs);
 0779    }
 780
 781    /// <summary>
 782    /// Rotates this vector by the specified angle (in radians).
 783    /// </summary>
 784    /// <param name="vec">The vector to rotate.</param>
 785    /// <param name="angleInRadians">The angle in radians.</param>
 786    /// <returns>The rotated vector.</returns>
 787    public static Vector2d Rotate(Vector2d vec, Fixed64 angleInRadians)
 1788    {
 1789        Fixed64 cos = FixedMath.Cos(angleInRadians);
 1790        Fixed64 sin = FixedMath.Sin(angleInRadians);
 1791        return new Vector2d(
 1792            vec.x * cos - vec.y * sin,
 1793            vec.x * sin + vec.y * cos
 1794        );
 1795    }
 796
 797    #endregion
 798
 799    #region Conversion
 800
 801    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 802    public override string ToString()
 19803    {
 19804        return $"({Math.Round((double)x, 2)}, {Math.Round((double)y, 2)})";
 19805    }
 806
 807    /// <summary>
 808    /// Converts this <see cref="Vector2d"/> to a <see cref="Vector3d"/>,
 809    /// mapping the Y component of this vector to the Z axis in the resulting vector.
 810    /// </summary>
 811    /// <param name="z">The value to assign to the Y axis of the resulting <see cref="Vector3d"/>.</param>
 812    /// <returns>
 813    /// A new <see cref="Vector3d"/> where (X, Y) from this <see cref="Vector2d"/>
 814    /// become (X, Z) in the resulting vector, with the provided Z parameter assigned to Y.
 815    /// </returns>
 816    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 817    public readonly Vector3d ToVector3d(Fixed64 z)
 1818    {
 1819        return new Vector3d(x, z, y);
 1820    }
 821
 822    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 823    public readonly void Deconstruct(out float x, out float y)
 1824    {
 1825        x = this.x.ToPreciseFloat();
 1826        y = this.y.ToPreciseFloat();
 1827    }
 828
 829    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 830    public readonly void Deconstruct(out int x, out int y)
 1831    {
 1832        x = this.x.RoundToInt();
 1833        y = this.y.RoundToInt();
 1834    }
 835
 836    /// <summary>
 837    /// Converts each component of the vector from radians to degrees.
 838    /// </summary>
 839    /// <param name="radians">The vector with components in radians.</param>
 840    /// <returns>A new vector with components converted to degrees.</returns>
 841    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 842    public static Vector2d ToDegrees(Vector2d radians)
 1843    {
 1844        return new Vector2d(
 1845            FixedMath.RadToDeg(radians.x),
 1846            FixedMath.RadToDeg(radians.y)
 1847        );
 1848    }
 849
 850    /// <summary>
 851    /// Converts each component of the vector from degrees to radians.
 852    /// </summary>
 853    /// <param name="degrees">The vector with components in degrees.</param>
 854    /// <returns>A new vector with components converted to radians.</returns>
 855    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 856    public static Vector2d ToRadians(Vector2d degrees)
 1857    {
 1858        return new Vector2d(
 1859            FixedMath.DegToRad(degrees.x),
 1860            FixedMath.DegToRad(degrees.y)
 1861        );
 1862    }
 863
 864    #endregion
 865
 866    #region Operators
 867
 868    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 869    public static Vector2d operator +(Vector2d v1, Vector2d v2)
 1870    {
 1871        return new Vector2d(v1.x + v2.x, v1.y + v2.y);
 1872    }
 873
 874    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 875    public static Vector2d operator +(Vector2d v1, Fixed64 mag)
 2876    {
 2877        return new Vector2d(v1.x + mag, v1.y + mag);
 2878    }
 879
 880    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 881    public static Vector2d operator +(Fixed64 mag, Vector2d v1)
 1882    {
 1883        return v1 + mag;
 1884    }
 885
 886    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 887    public static Vector2d operator +(Vector2d v1, (int x, int y) v2)
 2888    {
 2889        return new Vector2d(v1.x + v2.x, v1.y + v2.y);
 2890    }
 891
 892    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 893    public static Vector2d operator +((int x, int y) v2, Vector2d v1)
 1894    {
 1895        return v1 + v2;
 1896    }
 897
 898    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 899    public static Vector2d operator +(Vector2d v1, (float x, float y) v2)
 2900    {
 2901        return new Vector2d(v1.x + v2.x, v1.y + v2.y);
 2902    }
 903
 904    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 905    public static Vector2d operator +((float x, float y) v1, Vector2d v2)
 1906    {
 1907        return v2 + v1;
 1908    }
 909
 910    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 911    public static Vector2d operator -(Vector2d v1, Vector2d v2)
 5912    {
 5913        return new Vector2d(v1.x - v2.x, v1.y - v2.y);
 5914    }
 915
 916    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 917    public static Vector2d operator -(Vector2d v1, Fixed64 mag)
 1918    {
 1919        return new Vector2d(v1.x - mag, v1.y - mag);
 1920    }
 921
 922    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 923    public static Vector2d operator -(Fixed64 mag, Vector2d v1)
 1924    {
 1925        return new Vector2d(mag - v1.x, mag - v1.y);
 1926    }
 927
 928    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 929    public static Vector2d operator -(Vector2d v1, (int x, int y) v2)
 1930    {
 1931        return new Vector2d(v1.x - v2.x, v1.y - v2.y);
 1932    }
 933
 934    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 935    public static Vector2d operator -((int x, int y) v1, Vector2d v2)
 1936    {
 1937        return new Vector2d(v1.x - v2.x, v1.y - v2.y);
 1938    }
 939
 940    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 941    public static Vector2d operator -(Vector2d v1, (float x, float y) v2)
 1942    {
 1943        return new Vector2d(v1.x - v2.x, v1.y - v2.y);
 1944    }
 945
 946    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 947    public static Vector2d operator -((float x, float y) v1, Vector2d v2)
 1948    {
 1949        return new Vector2d(v1.x - v2.x, v1.y - v2.y);
 1950    }
 951
 952    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 953    public static Vector2d operator -(Vector2d v1)
 1954    {
 1955        return new Vector2d(v1.x * -Fixed64.One, v1.y * -Fixed64.One);
 1956    }
 957
 958    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 959    public static Vector2d operator *(Vector2d v1, Fixed64 mag)
 1960    {
 1961        return new Vector2d(v1.x * mag, v1.y * mag);
 1962    }
 963
 964    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 965    public static Vector2d operator *(Vector2d v1, Vector2d v2)
 1966    {
 1967        return new Vector2d(v1.x * v2.x, v1.y * v2.y);
 1968    }
 969
 970    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 971    public static Vector2d operator /(Vector2d v1, Fixed64 div)
 1972    {
 1973        return new Vector2d(v1.x / div, v1.y / div);
 1974    }
 975
 976    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 977    public static bool operator ==(Vector2d left, Vector2d right)
 1978    {
 1979        return left.Equals(right);
 1980    }
 981
 982    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 983    public static bool operator !=(Vector2d left, Vector2d right)
 1984    {
 1985        return !left.Equals(right);
 1986    }
 987
 988    #endregion
 989
 990    #region Equality, HashCode, and Comparable Overrides
 991
 992    /// <summary>
 993    /// Are all components of this vector equal to zero?
 994    /// </summary>
 995    /// <returns></returns>
 996    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 997    public bool EqualsZero()
 2998    {
 2999        return this.Equals(Zero);
 21000    }
 1001
 1002    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1003    public bool NotZero()
 11004    {
 11005        return !EqualsZero();
 11006    }
 1007
 1008    /// <summary>
 1009    /// Checks whether all components are strictly greater than <see cref="Fixed64.Epsilon"/>.
 1010    /// </summary>
 1011    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1012    public bool AllComponentsGreaterThanEpsilon()
 21013    {
 21014        return x > Fixed64.Epsilon && y > Fixed64.Epsilon;
 21015    }
 1016
 1017    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1018    public override bool Equals(object? obj)
 51019    {
 51020        return obj is Vector2d other && Equals(other);
 51021    }
 1022
 1023    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1024    public bool Equals(Vector2d other)
 721025    {
 721026        return other.x == x && other.y == y;
 721027    }
 1028
 1029    public bool Equals(Vector2d x, Vector2d y)
 21030    {
 21031        return x.Equals(y);
 21032    }
 1033
 1034    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1035    public override int GetHashCode()
 31036    {
 31037        return StateHash;
 31038    }
 1039
 1040    public int GetHashCode(Vector2d obj)
 11041    {
 11042        return obj.GetHashCode();
 11043    }
 1044
 1045    public int CompareTo(Vector2d other)
 11046    {
 11047        return SqrMagnitude.CompareTo(other.SqrMagnitude);
 11048    }
 1049
 1050    #endregion
 1051}

Methods/Properties

.ctor(System.Int32,System.Int32)
.ctor(System.Single,System.Single)
.ctor(System.Double,System.Double)
.ctor(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
get_RotatedRight()
get_RotatedLeft()
get_RightHandNormal()
get_LeftHandNormal()
get_Normal()
get_Magnitude()
get_SqrMagnitude()
get_LongStateHash()
get_StateHash()
get_Item(System.Int32)
set_Item(System.Int32,FixedMathSharp.Fixed64)
Set(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
AddInPlace(FixedMathSharp.Fixed64)
AddInPlace(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
AddInPlace(FixedMathSharp.Vector2d)
SubtractInPlace(FixedMathSharp.Fixed64)
SubtractInPlace(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
SubtractInPlace(FixedMathSharp.Vector2d)
ScaleInPlace(FixedMathSharp.Fixed64)
ScaleInPlace(FixedMathSharp.Vector2d)
Normalize()
Normalize(FixedMathSharp.Fixed64&)
LerpInPlace(FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
LerpInPlace(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
Lerp(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
Lerped(FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
RotateInPlace(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
Rotated(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
Rotated(FixedMathSharp.Vector2d)
RotateInverse(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
RotateRightInPlace()
RotateLeftInPlace()
ReflectInPlace(FixedMathSharp.Vector2d)
ReflectInPlace(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
ReflectInPlace(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
Reflected(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
Reflected(FixedMathSharp.Vector2d)
Dot(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
Dot(FixedMathSharp.Vector2d)
CrossProduct(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
CrossProduct(FixedMathSharp.Vector2d)
Distance(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
Distance(FixedMathSharp.Vector2d)
SqrDistance(FixedMathSharp.Fixed64,FixedMathSharp.Fixed64)
SqrDistance(FixedMathSharp.Vector2d)
GetNormalized(FixedMathSharp.Vector2d)
GetMagnitude(FixedMathSharp.Vector2d)
Abs(FixedMathSharp.Vector2d)
Sign(FixedMathSharp.Vector2d)
CreateRotation(FixedMathSharp.Fixed64)
Distance(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
SqrDistance(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
ForwardDirection(FixedMathSharp.Fixed64)
Dot(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
Scale(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
CrossProduct(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
Rotate(FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
ToString()
ToVector3d(FixedMathSharp.Fixed64)
Deconstruct(System.Single&,System.Single&)
Deconstruct(System.Int32&,System.Int32&)
ToDegrees(FixedMathSharp.Vector2d)
ToRadians(FixedMathSharp.Vector2d)
op_Addition(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
op_Addition(FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
op_Addition(FixedMathSharp.Fixed64,FixedMathSharp.Vector2d)
op_Addition(FixedMathSharp.Vector2d,System.ValueTuple`2<System.Int32,System.Int32>)
op_Addition(System.ValueTuple`2<System.Int32,System.Int32>,FixedMathSharp.Vector2d)
op_Addition(FixedMathSharp.Vector2d,System.ValueTuple`2<System.Single,System.Single>)
op_Addition(System.ValueTuple`2<System.Single,System.Single>,FixedMathSharp.Vector2d)
op_Subtraction(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
op_Subtraction(FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
op_Subtraction(FixedMathSharp.Fixed64,FixedMathSharp.Vector2d)
op_Subtraction(FixedMathSharp.Vector2d,System.ValueTuple`2<System.Int32,System.Int32>)
op_Subtraction(System.ValueTuple`2<System.Int32,System.Int32>,FixedMathSharp.Vector2d)
op_Subtraction(FixedMathSharp.Vector2d,System.ValueTuple`2<System.Single,System.Single>)
op_Subtraction(System.ValueTuple`2<System.Single,System.Single>,FixedMathSharp.Vector2d)
op_UnaryNegation(FixedMathSharp.Vector2d)
op_Multiply(FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
op_Multiply(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
op_Division(FixedMathSharp.Vector2d,FixedMathSharp.Fixed64)
op_Equality(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
op_Inequality(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
EqualsZero()
NotZero()
AllComponentsGreaterThanEpsilon()
Equals(System.Object)
Equals(FixedMathSharp.Vector2d)
Equals(FixedMathSharp.Vector2d,FixedMathSharp.Vector2d)
GetHashCode()
GetHashCode(FixedMathSharp.Vector2d)
CompareTo(FixedMathSharp.Vector2d)