Files
Hasebe/Library/PackageCache/com.annulusgames.lit-motion@12af37b103ef/Runtime/Options/IntegerOptions.cs
T
2026-09-21 12:15:57 +03:00

41 lines
969 B
C#

using System;
namespace LitMotion
{
/// <summary>
/// Options for integer type motion.
/// </summary>
[Serializable]
public struct IntegerOptions : IMotionOptions, IEquatable<IntegerOptions>
{
public RoundingMode RoundingMode;
public readonly bool Equals(IntegerOptions other)
{
return other.RoundingMode == RoundingMode;
}
public override readonly bool Equals(object obj)
{
if (obj is IntegerOptions integerOptions) return Equals(integerOptions);
return false;
}
public override readonly int GetHashCode()
{
return (int)RoundingMode;
}
}
/// <summary>
/// Specifies the rounding format for values after the decimal point.
/// </summary>
public enum RoundingMode : byte
{
ToEven,
AwayFromZero,
ToZero,
ToPositiveInfinity,
ToNegativeInfinity
}
}