@esengine/nova-ecs-math - v1.0.5
    Preparing search index...

    Class FixedVector2

    2D Vector using fixed-point arithmetic for deterministic calculations 使用定点算术的2D向量,用于确定性计算

    Index

    Constructors

    Properties

    DOWN: FixedVector2 = ...
    LEFT: FixedVector2 = ...
    ONE: FixedVector2 = ...
    RIGHT: FixedVector2 = ...
    UP: FixedVector2 = ...
    ZERO: FixedVector2 = ...

    Methods

    • Get the angle of this vector from the positive X axis 获取此向量相对于正X轴的角度

      Returns Fixed

    • Get a vector perpendicular to this one (rotated 90 degrees counter-clockwise) 获取垂直于此向量的向量(逆时针旋转90度)

      Returns FixedVector2

    • Calculate the squared magnitude (more efficient than magnitude) 计算平方大小(比magnitude更高效)

      Returns Fixed

    • Convert to array [x, y] 转换为数组 [x, y]

      Returns [number, number]

    • Convert to string representation 转换为字符串表示

      Returns string