# shz_quadratic_roots

Source: https://sh4zam.com/api/scalar/shz_quadratic_roots/

> Uses the quadratic formula with the given coefficients to solve for the two roots, returning true if any real roots exist, and false if the roots are only..

```c
SHZ_INLINE bool shz_quadratic_roots(float a, float b, float c, float* root1, float* root2) SHZ_NOEXCEPT;
```

Uses the quadratic formula with the given coefficients to solve for the two roots, returning `true` if any real roots exist, and `false` if the roots are only imaginary.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `a` | `float` |  |
| `b` | `float` |  |
| `c` | `float` |  |
| `root1` | `float *` |  |
| `root2` | `float *` |  |

## Returns

`bool`

## Availability

- **C++ equivalent:** [`shz::quadratic_roots`](https://sh4zam.com/api/cpp/#shzquadratic_roots)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_scalar.h:252`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_scalar.h#L252)
- **Module:** [Scalar](https://sh4zam.com/api/scalar/), section "Miscellaneous"
