* fix docs paths for website Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix docs paths for website Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
44 lines
67 KiB
Markdown
44 lines
67 KiB
Markdown
---
|
|
title: "segEndX"
|
|
excerpt: "Compute the ending point of the provided line segment along the 'x' axis."
|
|
layout: manual
|
|
---
|
|
|
|
Compute the ending point of the provided line segment along the 'x' axis.
|
|
|
|
|
|
|
|
```js
|
|
segEndX(tag: TagIdentifier) -> number
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | | Yes |
|
|
|
|
### Returns
|
|
|
|
`number`
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
const exampleSketch = startSketchOn('XZ')
|
|
|> startProfileAt([0, 0], %)
|
|
|> line([20, 0], %, $thing)
|
|
|> line([0, 5], %)
|
|
|> line([segEndX(thing), 0], %)
|
|
|> line([-20, 10], %)
|
|
|> close(%)
|
|
|
|
const example = extrude(5, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
|