2019-02-01 17:19:20 +00:00
|
|
|
|
namespace RobloxFiles.DataTypes
|
2019-01-26 00:39:37 +00:00
|
|
|
|
{
|
|
|
|
|
public struct UDim
|
|
|
|
|
{
|
|
|
|
|
public readonly float Scale;
|
|
|
|
|
public readonly int Offset;
|
|
|
|
|
|
|
|
|
|
public UDim(float scale = 0, int offset = 0)
|
|
|
|
|
{
|
|
|
|
|
Scale = scale;
|
|
|
|
|
Offset = offset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static UDim operator+(UDim a, UDim b)
|
|
|
|
|
{
|
|
|
|
|
return new UDim(a.Scale + b.Scale, a.Offset + b.Offset);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static UDim operator-(UDim a, UDim b)
|
|
|
|
|
{
|
|
|
|
|
return new UDim(a.Scale - b.Scale, a.Offset - b.Offset);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return string.Join(", ", Scale, Offset);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|