Table of Contents

Method ReflectXInBounds

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

ReflectXInBounds(IExplicitShape<int>)

Returns a new shape with X reflected, but translated to keep it the same bounds as the original.

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

Parameters

shape IExplicitShape<int>

The shape to reflect.

Returns

IExplicitShape<int>

Examples

Suppose the input shape has the points {1, 2, 4}. Then the reflected shape is {-4, -2, -1}, and translating this to be in the same bounds give the shape {1, 3, 4}.

ReflectXInBounds(IExplicitShape<GridPoint2>)

Returns a new shape with X reflected, but translated to keep it the same bounds as the original.

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

Parameters

shape IExplicitShape<GridPoint2>

The shape to reflect.

Returns

IExplicitShape<GridPoint2>

ReflectXInBounds(IExplicitShape<GridPoint3>)

Returns a new shape with X reflected, but translated to keep it the same bounds as the original.

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

Parameters

shape IExplicitShape<GridPoint3>

The shape to reflect.

Returns

IExplicitShape<GridPoint3>