2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-10-16 15:42:30 +02:00
|
|
|
title: Point.dy()
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-29 15:38:16 +02:00
|
|
|
The `Point.dy()` method returns the delta (in mm) along the Y-axis between this
|
|
|
|
point and the point you pass it.
|
2021-10-16 15:42:30 +02:00
|
|
|
|
2022-09-29 15:38:16 +02:00
|
|
|
## Signature
|
2021-11-06 19:03:54 +01:00
|
|
|
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
|
|
|
float point.dy(Point point)
|
|
|
|
```
|
|
|
|
|
2022-09-29 15:38:16 +02:00
|
|
|
## Example
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-29 15:38:16 +02:00
|
|
|
<Example caption="An example of the Point.dy() method">
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
2022-09-29 15:38:16 +02:00
|
|
|
({ Point, points, Path, paths, units, part }) => {
|
|
|
|
|
|
|
|
points.from = new Point(10, 40)
|
|
|
|
points.to = new Point(10, 10)
|
2022-12-30 07:47:29 -08:00
|
|
|
|
2022-09-29 15:38:16 +02:00
|
|
|
paths.line = new Path()
|
|
|
|
.move(points.from)
|
|
|
|
.line(points.to)
|
|
|
|
.setClass("dotted")
|
|
|
|
.setText(units(points.from.dy(points.to)), 'center')
|
|
|
|
|
2022-12-09 21:23:35 -08:00
|
|
|
// Prevents clipping
|
|
|
|
paths.diag = new Path()
|
|
|
|
.move(new Point(-10,40))
|
|
|
|
.move(new Point(60,10))
|
|
|
|
|
2022-09-29 15:38:16 +02:00
|
|
|
return part
|
|
|
|
}
|
2021-08-25 16:09:31 +02:00
|
|
|
```
|
2022-09-29 15:38:16 +02:00
|
|
|
</Example>
|