9cfd5b2211
There's a lot of code at play here, so I haven't tested it yet. A good chunk of the components are available though.
29 lines
673 B
C#
29 lines
673 B
C#
namespace Roblox.DataTypes
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
} |