@@ -1,6 +1,9 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.FixedPoint
|
||||
@@ -10,10 +13,10 @@ namespace Content.Shared.FixedPoint
|
||||
/// To enforce this level of precision, floats are shifted by 2 decimal points, rounded, and converted to an int.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct FixedPoint2 : ISelfSerialize, IComparable<FixedPoint2>, IEquatable<FixedPoint2>, IFormattable
|
||||
public struct FixedPoint2 : ISelfSerialize, IComparable<FixedPoint2>, IEquatable<FixedPoint2>
|
||||
{
|
||||
private int _value;
|
||||
private const int Shift = 2;
|
||||
private static readonly int Shift = 2;
|
||||
|
||||
public static FixedPoint2 MaxValue { get; } = new(int.MaxValue);
|
||||
public static FixedPoint2 Epsilon { get; } = new(1);
|
||||
@@ -247,11 +250,6 @@ namespace Content.Shared.FixedPoint
|
||||
|
||||
public override readonly string ToString() => $"{ShiftDown().ToString(CultureInfo.InvariantCulture)}";
|
||||
|
||||
public string ToString(string? format, IFormatProvider? formatProvider)
|
||||
{
|
||||
return ToString();
|
||||
}
|
||||
|
||||
public readonly string Serialize()
|
||||
{
|
||||
return ToString();
|
||||
|
||||
Reference in New Issue
Block a user