---
title: "normalize(_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/normalize(_:)-100kb"
---

# normalize(_:)

Returns a vector pointing in the same direction of the supplied vector with a length of 1.

## Declaration

```swift
func normalize(_ x: SIMD2<Float>) -> SIMD2<Float>
```

## Parameters

- `x`: The vector to normalize.

## Return Value

Return Value The normalized vector.

## Discussion

Discussion This function returns an undefined value if the supplied vector has zero length or is poorly scaled such that an intermediate computation overflows or underflows.

## See Also

### Geometry Functions

- [cross(_:_:)](simd/cross(_:_:)-53xk2.md)
- [dot(_:_:)](simd/dot(_:_:)-1vb5g.md)
- [project(_:_:)](simd/project(_:_:)-9wt83.md)
- [reflect(_:n:)](simd/reflect(_:n:)-6w80i.md)
- [refract(_:n:eta:)](simd/refract(_:n:eta:)-5bv79.md)
