# PointKt

Added in 1.1.0

*** ** * ** ***


```
public final class PointKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).component1()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver)` Returns the x coordinate of this point. |
| `static final float` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).component1()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver)` Returns the x coordinate of this point. |
| `static final int` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).component2()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver)` Returns the y coordinate of this point. |
| `static final float` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).component2()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver)` Returns the y coordinate of this point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).div(kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver, float scalar)` Divides this point by the specified scalar value and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).div(kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver, float scalar)` Divides this point by the specified scalar value and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).minus(android.graphics.Point)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html p)` Offsets this point by the negation of the specified point and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).minus(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver, int xy)` Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).minus(android.graphics.PointF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html p)` Offsets this point by the negation of the specified point and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).minus(kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver, float xy)` Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).plus(android.graphics.Point)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html p)` Offsets this point by the specified point and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).plus(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver, int xy)` Offsets this point by the specified amount on both X and Y axis and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).plus(android.graphics.PointF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html p)` Offsets this point by the specified point and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).plus(kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver, float xy)` Offsets this point by the specified amount on both X and Y axis and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).times(kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver, float scalar)` Multiplies this point by the specified scalar value and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).times(kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver, float scalar)` Multiplies this point by the specified scalar value and returns the result as a new point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).toPoint()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver)` Returns a `https://developer.android.com/reference/android/graphics/Point.html` representation of this point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).toPointF()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver)` Returns a `https://developer.android.com/reference/android/graphics/PointF.html` representation of this point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.Point).unaryMinus()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Point.html receiver)` Returns a new point representing the negation of this point. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PointKt#(android.graphics.PointF).unaryMinus()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html receiver)` Returns a new point representing the negation of this point. |

## Public methods

### component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:component1) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final int component1(@NonNull Point receiver)
```

Returns the x coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

```
val (x, y) = myPoint
```

### component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:component1) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final float component1(@NonNull PointF receiver)
```

Returns the x coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

```
val (x, y) = myPoint
```

### component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:component2) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final int component2(@NonNull Point receiver)
```

Returns the y coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

```
val (x, y) = myPoint
```

### component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:component2) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final float component2(@NonNull PointF receiver)
```

Returns the y coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

```
val (x, y) = myPoint
```

### div

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:div) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/core#1.10.0)

```
public static final @NonNull Point div(@NonNull Point receiver, float scalar)
```

Divides this point by the specified scalar value and returns the result as a new point.

### div

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:div) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/core#1.10.0)

```
public static final @NonNull PointF div(@NonNull PointF receiver, float scalar)
```

Divides this point by the specified scalar value and returns the result as a new point.

### minus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:minus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull Point minus(@NonNull Point receiver, @NonNull Point p)
```

Offsets this point by the negation of the specified point and returns the result as a new point.

### minus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:minus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull Point minus(@NonNull Point receiver, int xy)
```

Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.

### minus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:minus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PointF minus(@NonNull PointF receiver, @NonNull PointF p)
```

Offsets this point by the negation of the specified point and returns the result as a new point.

### minus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:minus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PointF minus(@NonNull PointF receiver, float xy)
```

Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.

### plus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:plus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull Point plus(@NonNull Point receiver, @NonNull Point p)
```

Offsets this point by the specified point and returns the result as a new point.

### plus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:plus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull Point plus(@NonNull Point receiver, int xy)
```

Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.

### plus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:plus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PointF plus(@NonNull PointF receiver, @NonNull PointF p)
```

Offsets this point by the specified point and returns the result as a new point.

### plus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:plus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PointF plus(@NonNull PointF receiver, float xy)
```

Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.

### times

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:times) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/core#1.10.0)

```
public static final @NonNull Point times(@NonNull Point receiver, float scalar)
```

Multiplies this point by the specified scalar value and returns the result as a new point.

### times

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:times) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/core#1.10.0)

```
public static final @NonNull PointF times(@NonNull PointF receiver, float scalar)
```

Multiplies this point by the specified scalar value and returns the result as a new point.

### toPoint

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:toPoint) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull Point toPoint(@NonNull PointF receiver)
```

Returns a `https://developer.android.com/reference/android/graphics/Point.html` representation of this point.

### toPointF

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:toPointF) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PointF toPointF(@NonNull Point receiver)
```

Returns a `https://developer.android.com/reference/android/graphics/PointF.html` representation of this point.

### unaryMinus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:unaryMinus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull Point unaryMinus(@NonNull Point receiver)
```

Returns a new point representing the negation of this point.

### unaryMinus

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/Point.kt+function:unaryMinus) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PointF unaryMinus(@NonNull PointF receiver)
```

Returns a new point representing the negation of this point.