HexMath class

六边形数学工具类

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

inBounds(HexCoordinate hex, int minCol, int maxCol, int minRow, int maxRow, bool isPointy) bool
检查坐标是否在矩形范围内
lerp(HexCoordinate a, HexCoordinate b, double t) HexCoordinate
计算两点之间的线性插值
linePath(HexCoordinate a, HexCoordinate b) List<HexCoordinate>
获取从 a 到 b 的直线路径
rectangleGrid(int cols, int rows, bool isPointy) List<HexCoordinate>
获取矩形区域内的所有六边形坐标