---
title: "refract(_:n:eta:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/refract(_:n:eta:)-2macj"
---

# refract(_:n:eta:)

Returns the refraction direction of an incident vector, a unit normal vector, and an index of refraction eta.

## Declaration

```swift
func refract(_ x: SIMD4<Double>, n: SIMD4<Double>, eta: Double) -> SIMD4<Double>
```

## See Also

### Geometry Functions

- [dot(_:_:)](simd/dot(_:_:)-5ifd.md)
- [normalize(_:)](simd/normalize(_:)-3lhrd.md)
- [project(_:_:)](simd/project(_:_:)-1uuxo.md)
- [reflect(_:n:)](simd/reflect(_:n:)-1nabs.md)
