THE RETURN OF THE KING

This reverts commit c18d07538a.
This commit is contained in:
DrSmugleaf
2021-11-22 19:08:27 +01:00
parent 14e342663e
commit c3fe5909ad
65 changed files with 7021 additions and 236 deletions

View File

@@ -1,9 +1,6 @@
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
@@ -13,10 +10,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>
public struct FixedPoint2 : ISelfSerialize, IComparable<FixedPoint2>, IEquatable<FixedPoint2>, IFormattable
{
private int _value;
private static readonly int Shift = 2;
private const int Shift = 2;
public static FixedPoint2 MaxValue { get; } = new(int.MaxValue);
public static FixedPoint2 Epsilon { get; } = new(1);
@@ -250,6 +247,11 @@ 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();