public bool Contains(MPos uv) { return(bounds.Contains(uv.U, uv.V)); }
/// <summary> /// Resolve an array index from map coordinates /// </summary> /// <param name="uv"></param> /// <returns></returns> int Index(MPos uv) { return(uv.V * Size.Width + uv.U); }
public MPos Clamp(MPos uv) { return(uv.Clamp(new Rectangle(0, 0, Size.Width - 1, Size.Height - 1))); }