UNPKG

@three3d/tools

Version:

@three3d/tools 提供了 ThreeJS 常用的工具库

32 lines (18 loc) 694 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@three3d/tools](./tools.md) &gt; [getIncludedAngle](./tools.getincludedangle.md) ## getIncludedAngle() function 计算两个向量的夹角 **Signature:** ```typescript export declare function getIncludedAngle(from: Vector3, to: Vector3): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | from | Vector3 | 起始向量 | | to | Vector3 | 目标向量 | **Returns:** number 返回一个 0 到 pi(弧度)的数值 ## Remarks 与 `Vector3.angleTo(v)` 不同的是:当 from 或 to 为零时,会返回 0