Table of Contents

Interface IVectorPoint<TPoint>

Namespace
Gamelogic.Grids
Assembly
Assembly-CSharp.dll

A VectorPoint is a point that is also an algebraic vector.

[Version(1, 0, 0)]
public interface IVectorPoint<TPoint> : ISplicedVectorPoint<TPoint, TPoint> where TPoint : IVectorPoint<TPoint>

Type Parameters

TPoint
Inherited Members
Extension Methods

Properties

X

int X { get; }

Property Value

int

Y

int Y { get; }

Property Value

int

Methods

Div(TPoint)

Integer divides a point by another point component by component.

[Version(1, 7, 0)]
TPoint Div(TPoint other)

Parameters

other TPoint

Returns

TPoint

Examples

(-5, 5) Div(2, 2) == (-3, 2)

Remarks

Remainders are always positive.

Magnitude()

int Magnitude()

Returns

int

Mod(TPoint)

Integer divides a point component by component and returns the remainder.

[Version(1, 7, 0)]
TPoint Mod(TPoint other)

Parameters

other TPoint

Returns

TPoint

Examples

(-5, 5) Mod (2, 2) == (1, 1)

Remarks

Remainders are always positive.

Mul(TPoint)

Multiplies two points component by component.

[Version(1, 7, 0)]
TPoint Mul(TPoint other)

Parameters

other TPoint

Returns

TPoint

Examples

(-5, 5) Mul (2, 2) == (-10, 10)

ScaleDown(int)

Scales this vector by the given amount.

TPoint ScaleDown(int r)

Parameters

r int

Returns

TPoint

Examples

v.ScaleUp(1)
v.ScaleUp(n) ==  v.ScaleUp(n - 1).Translate(v)

ScaleUp(int)

TPoint ScaleUp(int r)

Parameters

r int

Returns

TPoint