# Class com.sekati.geom.Point

`IPoint`

## Description

Create a Point Object

``` Usage:
var Point = new com.sekati.geom.Point(10,10);
```

x, y

## Method Index

`new Point()`
clone(), displace(), getAbsoluteGridDistance(), getAbsoluteGridDistanceAllowDiagonals(), getAngle(), getDistance(), isEqual(), offset(), rotate()

## Constructor Detail

### Point

`public function Point(nX:Number, nY:Number)`

Point Constructor

#### Parameters

 `nX` (Number) `nY` (Number)

## Field Detail

### x

`public x:Number`

### y

`public y:Number`

## Method Detail

### isEqual

`public function isEqual(p:Point):Boolean`

check if two points match

#### Parameters

 `p` (Point)

Boolean

### getDistance

`public function getDistance(p:Point):Number`

get distance between two points

#### Parameters

 `p` (Point)

Number

### getAbsoluteGridDistance

`public function getAbsoluteGridDistance(p:Point):Number`

Algo to give the grid based distance when only vertical & horizontal moves are allowed

#### Parameters

 `p` (Point)

Number

### getAbsoluteGridDistanceAllowDiagonals

`public function getAbsoluteGridDistanceAllowDiagonals(p:Point):Number`

Algo to give the grid based distance when diagonal moves are allowed by finding math.min of the differences, we're figuring out how many moves can be diagonal ones. Then we can just substract that number from the normal .getAbsoluteGridDistance() method since diagonals take 1 move instead of the usual 2

#### Parameters

 `p` (Point)

Number

### getAngle

`public function getAngle(p:Point):Number`

Get the angle degree between this point and a second point.

#### Parameters

 `p` (Point)

Number

### displace

`public function displace(nX:Number, nY:Number):Point`

Returns a new point based on this point with x and y offset values

#### Parameters

 `nX` (Number) `nY` (Number)

Point

### offset

`public function offset(x:Number, y:Number):Void`

Offset the Point object by a specified amount.

#### Parameters

 `x` (Number) horizontal offset `y` (Number) vertical offset

Void

### rotate

`public function rotate(p:Point, angle:Number):Void`

Rotate this Point around another Point by the specified angle.

#### Parameters

 `p` (Point) `angle` (Number)

Void

### clone

`public function clone():Point`

Clone this Point.

Point