跳到主要内容

KVector2d.angle() method

计算两向量的夹角,以弧度计。

Calculate the angle between this vector and the other vector in radians.

Signature:

angle(other: KVector2d): number;

Links: angle(other: KVector2d): number;

Parameters

Parameter

Type

Description

other

KVector2d

要比较的向量。

The vector to compare this vector with.

Returns:

number

两向量的夹角,范围为[0, PI]。

The angle between the two vectors, the range is [0, PI].