# Class: SpaCalculator

## SpaCalculator()

#### new SpaCalculator()

空间计算

Source:
  - SpaCalculator.js, line 12

### Methods

#### (async, static) angle2PIOfDot(xy0, xy1) → {Promise.<double>}

计算直线角度(0到2PI)

##### Parameters:

Name | Type | Description
--- | --- | ---
`xy0` | Dot | 点坐标
`xy1` | Dot | 点坐标

Source:
  - SpaCalculator.js, line 56

##### Returns:

直线角度(0到2PI)

Type
  Promise.<double>

#### (async, static) angle2PIOfXY(x0, y0, x1, y1) → {Promise.<double>}

计算直线角度(0到2PI)

##### Parameters:

Name | Type | Description
--- | --- | ---
`x0` | double | x0坐标
`y0` | double | y0坐标
`x1` | double | x1坐标
`y1` | double | y1坐标

Source:
  - SpaCalculator.js, line 73

##### Returns:

直线角度(0到2PI)

Type
  Promise.<double>

#### (async, static) anglePIOfDot(xy0, xy1) → {Promise.<double>}

计算直线角度(-PI到+PI)

##### Parameters:

Name | Type | Description
--- | --- | ---
`xy0` | Dot | 点坐标
`xy1` | Dot | 点坐标

Source:
  - SpaCalculator.js, line 24

##### Returns:

直线角度(-PI到+PI)

Type
  Promise.<double>

#### (async, static) anglePIOfXY(x0, y0, x1, y1) → {Promise.<double>}

计算直线角度(-PI到+PI)

##### Parameters:

Name | Type | Description
--- | --- | ---
`x0` | double | x0坐标
`y0` | double | y0坐标
`x1` | double | x1坐标
`y1` | double | y1坐标

Source:
  - SpaCalculator.js, line 41

##### Returns:

直线角度(-PI到+PI)

Type
  Promise.<double>

#### (async, static) arcSelfCross(pointArry) → {Promise.List.<CrossData>}

找出自相交的交点,自相交检查

##### Parameters:

Name | Type | Description
--- | --- | ---
`pointArry` | Array.<Dot> | 线坐标

Source:
  - SpaCalculator.js, line 169

##### Returns:

交点数组

Type
  Promise.List.<CrossData>

#### (async, static) calLinesInters(line1, line2) → {Promise.<Array.<Dot>>}

计算两条线的交点

##### Parameters:

Name | Type | Description
--- | --- | ---
`line1` | GeoVarLine | 线1
`line2` | GeoVarLine | 线2

Source:
  - SpaCalculator.js, line 145

##### Returns:

两条线的交点

Type
  Promise.<Array.<Dot>>

#### (async, static) distanceOfDot(xy0, xy1) → {Promise.<double>}

计算两点距离

##### Parameters:

Name | Type | Description
--- | --- | ---
`xy0` | Dot | 点坐标
`xy1` | Dot | 点坐标

Source:
  - SpaCalculator.js, line 88

##### Returns:

两点距离

Type
  Promise.<double>

#### (async, static) distanceOfXY(x0, y0, x1, y1) → {Promise.<double>}

计算两点距离

##### Parameters:

Name | Type | Description
--- | --- | ---
`x0` | double | x0坐标
`y0` | double | y0坐标
`x1` | double | x1坐标
`y1` | double | y1坐标

Source:
  - SpaCalculator.js, line 105

##### Returns:

两点距离

Type
  Promise.<double>