---
title: "trunc(_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/trunc(_:)-4p8mg"
---

# trunc(_:)

Returns each element in a vector rounded toward zero to the nearest integer.

## Declaration

```swift
func trunc(_ x: SIMD3<Double>) -> SIMD3<Double>
```

## See Also

### Math Functions

- [cbrt(_:)](simd/cbrt(_:)-38h14.md)
- [ceil(_:)](simd/ceil(_:)-72yci.md)
- [erf(_:)](simd/erf(_:)-8eer2.md)
- [erfc(_:)](simd/erfc(_:)-7ux6y.md)
- [floor(_:)](simd/floor(_:)-262rp.md)
- [fma(_:_:_:)](simd/fma(_:_:_:)-6w3jf.md)
- [fmod(_:_:)](simd/fmod(_:_:)-16oie.md)
- [hypot(_:_:)](simd/hypot(_:_:)-5z7ry.md)
- [lgamma(_:)](simd/lgamma(_:)-4lks7.md)
- [nextafter(_:_:)](simd/nextafter(_:_:)-7qi1e.md)
- [pow(_:_:)](simd/pow(_:_:)-6hgod.md)
- [remainder(_:_:)](simd/remainder(_:_:)-28w7v.md)
- [round(_:)](simd/round(_:)-3e7l9.md)
- [simd_muladd(_:_:_:)](simd/simd_muladd(_:_:_:)-74qpk.md)
- [tgamma(_:)](simd/tgamma(_:)-98alm.md)
