---
title: "segAng"
excerpt: "Compute the angle (in degrees) of the provided line segment."
layout: manual
---

Compute the angle (in degrees) of the provided line segment.



```js
segAng(tag: TagIdentifier) -> number
```


### Arguments

| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The line segment being queried by its tag | Yes |

### Returns

`number` 


### Examples

```js
exampleSketch = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> line(end = [10, 0])
  |> line(end = [5, 10], tag = $seg01)
  |> line(end = [-10, 0])
  |> angledLine([segAng(seg01), 10], %)
  |> line(end = [-10, 0])
  |> angledLine([segAng(seg01), -15], %)
  |> close()

example = extrude(exampleSketch, length = 4)
```

![Rendered example of segAng 0](data:image/png;base64,[encoded data, 83516 characters])


