Point
Extends:
leaflet~L.Point → Point
点类型
Example:
var point = new KQ.Struct.Point(200, 300);
Constructor Summary
Public Constructor | ||
public |
constructor(x: Number, y: Number, isRound: Boolean) 构造函数 |
Method Summary
Public Methods | ||
public |
返回当前点和给定点的和 |
|
public |
返回小数进位后的整数坐标 |
|
public |
distanceTo(point: Point): Number 返回两点间的距离 |
|
public |
返回当前点除以给定数值的结果 |
|
public |
如果给定的点有相同的坐标,则返回true |
|
public |
返回小数去尾后的整数坐标 |
|
public |
multiplyBy(num: Number): Point 返回当前点乘以给定数值的结果 |
|
public |
返回四舍五入后的坐标 |
|
public |
返回当前点和给定点的差 |
|
public |
转为字符串,主要用于调试 |
Public Constructors
Public Methods
public add(point: Point): Point source
返回当前点和给定点的和
Params:
Name | Type | Attribute | Description |
point | Point | point对象 |
public distanceTo(point: Point): Number source
返回两点间的距离
Params:
Name | Type | Attribute | Description |
point | Point | point对象 |
public divideBy(num: Number): Point source
返回当前点除以给定数值的结果
Params:
Name | Type | Attribute | Description |
num | Number | 除数 |
public equals(point: Point): Boolean source
如果给定的点有相同的坐标,则返回true
Params:
Name | Type | Attribute | Description |
point | Point | point对象 |
public multiplyBy(num: Number): Point source
返回当前点乘以给定数值的结果
Params:
Name | Type | Attribute | Description |
num | Number | 乘数 |