---
title: "PointF | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/PointF/"
---

# PointF

> [`PointF`](#pointf)

## Classes

### PointF

#### Constructors

##### Constructor

```ts
new PointF(x?, y?): PointF;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `x?` | `number` |
| `y?` | `number` |

###### Returns

#### Properties

##### x

```ts
x: number = 0;
```

##### y

```ts
y: number = 0;
```

#### Methods

##### clone()

```ts
clone(): PointF;
```

###### Returns

[`PointF`](#pointf)

##### distance()

```ts
distance(pt): number;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `pt` | [`PointF`](#pointf) |

###### Returns

`number`

##### equals()

```ts
equals(pt, tolerance?): boolean;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `pt` | [`PointF`](#pointf) |
| `tolerance?` | `number` |

###### Returns

`boolean`

##### isOrigin()

```ts
isOrigin(): boolean;
```

###### Returns

`boolean`

##### rotate()

```ts
rotate(angle): PointF;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `angle` | `number` |

###### Returns

[`PointF`](#pointf)

##### rotateAt()

```ts
rotateAt(angle, center?): PointF;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `angle` | `number` |
| `center?` | [`PointF`](#pointf) |

###### Returns

[`PointF`](#pointf)

##### round()

```ts
round(): PointF;
```

###### Returns

[`PointF`](#pointf)

##### scale()

```ts
scale(scaleX, scaleY): PointF;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `scaleX` | `number` |
| `scaleY` | `number` |

###### Returns

[`PointF`](#pointf)

##### toIPoint()

```ts
toIPoint(): IPoint;
```

###### Returns

[`IPoint`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/IPoint.md#ipoint)

##### toString()

```ts
toString(): string;
```

###### Returns

`string`

##### transform()

```ts
transform(transform, center): PointF;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `transform` | [`Transform`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/Transform.md#transform) |
| `center` | [`PointF`](#pointf) |

###### Returns

[`PointF`](#pointf)

##### translate()

```ts
translate(x, y): PointF;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `x` | `number` |
| `y` | `number` |

###### Returns

[`PointF`](#pointf)

##### fromIPoint()

```ts
static fromIPoint(point): PointF;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `point` | [`IPoint`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/IPoint.md#ipoint) |

###### Returns

[`PointF`](#pointf)

##### isEqual()

```ts
static isEqual(
   a, 
   b, 
   tolerance?): boolean;
```

###### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `a` | [`PointF`](#pointf) | `undefined` |
| `b` | [`PointF`](#pointf) | `undefined` |
| `tolerance` | `number` | `0.0001` |

###### Returns

`boolean`
