1
0
Fork 0
freesewing/sites/dev/docs/reference/api/point/dx/readme.mdx
Joost De Cock ab3204f9f1 chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus
setup. It's part of my efforts to simplify FreeSewing's setup so we can
focus on our core value proposition.
2024-09-28 13:13:48 +02:00

32 lines
572 B
Text

---
title: Point.dx()
---
The `Point.dx()` method returns the delta (in mm) along the X-axis between this
point and the point you pass it.
## Signature
```js
float point.dx(Point point)
```
## Example
<Example caption="An example of the Point.dx() method">
```js
({ Point, points, Path, paths, units, part }) => {
points.from = new Point(10, 10)
points.to = new Point(76.6, 10)
paths.line = new Path()
.move(points.from)
.line(points.to)
.setClass("dotted")
.setText(units(points.from.dx(points.to)), 'center')
return part
}
```
</Example>