Table of Contents

Method EuclideanNorm

Namespace
Gamelogic.Grids2
Assembly
Assembly-CSharp.dll

EuclideanNorm(GridPoint2)

Returns the Euclidean norm of this point, treating it as lying in a (normalized) hex grid.

public static float EuclideanNorm(GridPoint2 point)

Parameters

point GridPoint2

Returns

float

Remarks

Note that this does not give the same result as EuclideanNorm(GridPoint2). For example, the point (1, 1) has RectPoint.EuclideanNorm equal to sqrt(2), but the PointyHexPoint.EuclideanNorm is sqrt(3).

EuclideanNorm(Vector2)

Returns the Euclidean norm of this point, treating it as lying in a (normalized) hex grid.

public static float EuclideanNorm(Vector2 point)

Parameters

point Vector2

Returns

float

Remarks

Note that this does not give the same result as EuclideanNorm(GridPoint2). For example, the point (1, 1) has RectPoint.EuclideanNorm equal to sqrt(2), but the PointyHexPoint.EuclideanNorm is sqrt(3).