Function

# vDSP_vthrsc(_:_:_:_:_:_:_:)

Calculates single-precision vector threshold with signed constant to the specified range.

## Parameters

`__A`

Single-precision real input vector

`__IA`

Stride for `A`

`__B`

Pointer to single-precision real input scalar: lower threshold

`__C`

Pointer to single-precision real input scalar: output constant

`__D`

Single-precision real output vector

`__ID`

Stride for `D`

`__N`

The number of elements to process

## Discussion

Performs the following operation:

Creates vector `D` using the plus or minus value of scalar `*C`. The sign of the output element is determined by comparing input from vector `A` with threshold scalar `*B`. For input values less than `*B`, the negated value of `*C` is written to vector `D`. For input values greater than or equal to `*B`, `*C` is copied to vector `D`.

### Threshold Operations

`static func threshold<U>(U, to: Double, with: vDSP.ThresholdRule<Double>) -> [Double]`

Returns the elements of the supplied double-precision vector after applying a specified thresholding rule.

`static func threshold<U>(U, to: Float, with: vDSP.ThresholdRule<Float>) -> [Float]`

Returns the elements of the supplied single-precision vector after applying a specified thresholding rule.

`static func threshold<U, V>(U, to: Double, with: vDSP.ThresholdRule<Double>, result: inout V)`

Calculates the elements of the supplied double-precision vector after applying a specified thresholding rule.

`static func threshold<U, V>(U, to: Float, with: vDSP.ThresholdRule<Float>, result: inout V)`

Calculates the elements of the supplied single-precision vector after applying a specified thresholding rule.