---
title: "Cad2DPoint"
url: "https://reference.aspose.com/cad/java/com.aspose.cad.fileformats.cad.cadobjects/cad2dpoint/"
product: "Aspose.CAD for Java"
description: "The Cad 2d point."
---


The Cad 2d point.

## Constructors

| Constructor | Description |
| --- | --- |
| [Cad2DPoint()](#Cad2DPoint) | Initializes a new instance of the Cad2DPoint class. |
| [Cad2DPoint(double x, double y)](#Cad2DPoint-double-double) | Initializes a new instance of the Cad2DPoint class. |

## Methods

| Method | Description |
| --- | --- |
| [getX()](#getX) | Gets or sets the x. |
| [setX(double value)](#setX-double) | Gets or sets the x. |
| [getY()](#getY) | Gets or sets the y. |
| [setY(double value)](#setY-double) | Gets or sets the y. |
| [distance(Cad2DPoint destination)](#distance-com.aspose.cad.fileformats.cad.cadobjects.Cad2DPoint) | Distances the specified destination. |
| [getApsPoint()](#getApsPoint) | Gets the aps point. |

### Cad2DPoint() {#Cad2DPoint}
```java
public Cad2DPoint()
```

Initializes a new instance of the Cad2DPoint class.

### Cad2DPoint(double x, double y) {#Cad2DPoint-double-double}
```java
public Cad2DPoint(double x, double y)
```

Initializes a new instance of the Cad2DPoint class.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| x | double | The x ordinate. |
| y | double | The y ordinate. |

### getX() {#getX}
```java
public double getX()
```

Gets or sets the x.

**Returns:** double

### setX(double value) {#setX-double}
```java
public void setX(double value)
```

Gets or sets the x.

### getY() {#getY}
```java
public double getY()
```

Gets or sets the y.

**Returns:** double

### setY(double value) {#setY-double}
```java
public void setY(double value)
```

Gets or sets the y.

### distance(Cad2DPoint destination) {#distance-com.aspose.cad.fileformats.cad.cadobjects.Cad2DPoint}
```java
public double distance(Cad2DPoint destination)
```

Distances the specified destination.

**Parameters:**

| Parameter | Type | Description |
| --- | --- | --- |
| destination | Cad2DPoint | The destination. |

**Returns:** double - Distance to point

### getApsPoint() {#getApsPoint}
```java
public final com.aspose.foundation.rendering.ApsPoint getApsPoint()
```

Gets the aps point.

**Returns:** com.aspose.foundation.rendering.ApsPoint - ApsPoint

