<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/simd/simd_insphere-5jw77",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "simd"
    ],
    "preciseIdentifier" : "c:@F@simd_insphere#]3f#S0_#S0_#S0_#S0_#"
  },
  "title" : "simd_insphere"
}
-->

# simd_insphere

Tests if a single-precision point lies inside, on, or outside a sphere.

```
static float simd_insphere(simd_float3 __x, simd_float3 __a, simd_float3 __b, simd_float3 __c, simd_float3 __d);
```

## Parameters

`__x`

The point that the function tests.

`__a`

The first point that determines the sphere.

`__b`

The second point that determines the sphere.

`__c`

The third point that determines the sphere.

`__d`

The fourth point that determines the sphere.

## Return Value

A value that indicates whether the point lies inside, on, or outside the specified sphere.

## Discussion

If the points `a`, `b`, `c`, and `d` describe a positively-oriented sphere (that is, the sphere’s normals point away from its center), the function returns:

- A positive value if `x` is inside the sphere
- Zero if `x` is on the sphere
- A negative value if `x` is outside the sphere

The function flips sign of the return value if the sphere is negatively-oriented (that is, the sphere’s normals point towards its center).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)