Table of Contents

Method CenterOnOrigin

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

CenterOnOrigin(IExplicitShape<int>)

Gets a copy of the given shape translated so that the center of the shape (or the point closest to the center) falls on the origin.

[Version(2, 3, 0)]
public static IExplicitShape<int> CenterOnOrigin(this IExplicitShape<int> shape)

Parameters

shape IExplicitShape<int>

Returns

IExplicitShape<int>

CenterOnOrigin(IExplicitShape<GridPoint2>)

Gets a copy of the given shape translated so that the center of the shape (or the point closest to the center) falls on the origin.

[Version(2, 3, 0)]
public static IExplicitShape<GridPoint2> CenterOnOrigin(this IExplicitShape<GridPoint2> shape)

Parameters

shape IExplicitShape<GridPoint2>

Returns

IExplicitShape<GridPoint2>

CenterOnOrigin(IExplicitShape<GridPoint3>)

Gets a copy of the given shape translated so that the center of the shape (or the point closest to the center) falls on the origin.

[Version(2, 3, 0)]
public static IExplicitShape<GridPoint3> CenterOnOrigin(this IExplicitShape<GridPoint3> shape)

Parameters

shape IExplicitShape<GridPoint3>

Returns

IExplicitShape<GridPoint3>