Kav/Data/UVData.cs

20 lines
451 B
C#
Raw Normal View History

2020-12-10 21:53:55 +00:00
using Microsoft.Xna.Framework;
2020-12-12 05:05:54 +00:00
namespace Kav
2020-12-10 21:53:55 +00:00
{
public struct UVData
{
public Vector2 Offset { get; }
public Vector2 Percentage { get; }
public UVData(
Vector2 positionInAtlas,
Vector2 subTextureDimensions,
Vector2 atlasDimensions
) {
Percentage = subTextureDimensions / atlasDimensions;
Offset = positionInAtlas / atlasDimensions;
}
}
}