Microsoft.Xna.Framework.PointExtensions.ToIndex C# (CSharp) Méthode

ToIndex() public static méthode

Translates an x,y position to an array index.
public static ToIndex ( this point, int rowWidth ) : int
point this The position.
rowWidth int How many columns in a row.
Résultat int
        public static int ToIndex(this Point point, int rowWidth)
        {
            return point.Y * rowWidth + point.X;
        }