Skip to content
On this page

Home > @taiyuuki/utils > Vec2 > sub

Vec2.sub() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

计算两个点相减

Signature:

typescript
sub(v: number | Vec2): Vec2;
sub(v: number | Vec2): Vec2;

Parameters

ParameterTypeDescription
vnumber | Vec2参数“v”是一个number或“Vec2”对象。

Returns:

Vec2

  • 相减得到的点

Released under the MIT License.