[gs-longan](../README.md) / DPoint

# Class: DPoint

表示三维空间中的双精度点（Float64Array，长度为3）的工具类

与 `Point` 类似，但使用双精度浮点数组以提高数值精度。

## Table of contents

### Constructors

- [constructor](DPoint.md#constructor)

### Methods

- [add](DPoint.md#add)
- [clone](DPoint.md#clone)
- [subtract](DPoint.md#subtract)

## Constructors

### constructor

• **new DPoint**(): [`DPoint`](DPoint.md)

#### Returns

[`DPoint`](DPoint.md)

## Methods

### add

▸ **add**(`p1`, `p2`): `Float64Array`

将两个双精度点按分量相加，返回新的点

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `p1` | `Float64Array` | 第一个点（Float64Array，长度为3） |
| `p2` | `Float64Array` | 第二个点（Float64Array，长度为3） |

#### Returns

`Float64Array`

新的点（Float64Array，长度为3）

___

### clone

▸ **clone**(`p`): `Float64Array`

克隆一个双精度点，返回新的 Float64Array 实例

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `p` | `Float64Array` | 要克隆的点（Float64Array，长度为3） |

#### Returns

`Float64Array`

克隆后的点（Float64Array，长度为3）

___

### subtract

▸ **subtract**(`p1`, `p2`): `Float64Array`

将第一个双精度点减去第二个点，按分量返回新的点

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `p1` | `Float64Array` | 被减的点（Float64Array，长度为3） |
| `p2` | `Float64Array` | 减数点（Float64Array，长度为3） |

#### Returns

`Float64Array`

新的点（Float64Array，长度为3）
