@three3d/tools
Version:
@three3d/tools 提供了 ThreeJS 常用的工具库
31 lines (17 loc) • 626 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@three3d/tools](./tools.md) > [computeVectorScalar](./tools.computevectorscalar.md)
## computeVectorScalar() function
计算从向量 from 到 向量 to 的 等比例缩放;
**Signature:**
```typescript
export declare function computeVectorScalar<Vec extends VectorInstance>(from: Vec, to: Vec): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| from | Vec | |
| to | Vec | |
**Returns:**
number
## Remarks
假设 from 和 to 共线