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

# 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: SIMD2<Float>, n: SIMD2<Float>, eta: Float) -> SIMD2<Float>
```

## See Also

### Geometry Functions

- [cross(_:_:)](simd/cross(_:_:)-53xk2.md)
- [dot(_:_:)](simd/dot(_:_:)-1vb5g.md)
- [normalize(_:)](simd/normalize(_:)-100kb.md)
- [project(_:_:)](simd/project(_:_:)-9wt83.md)
- [reflect(_:n:)](simd/reflect(_:n:)-6w80i.md)
