BezierLookUpTable
extension BezierLookUpTable where Output: BezierPointType
-
Looks up the closest output to a given output value.
Returns
nil
if this lookup table is empty.Declaration
Swift
@inlinable public func closestEntry(toOutput output: Output) -> Entry?
-
Looks up the closest entry index to a given output value.
Returns
nil
if this lookup table is empty.Declaration
Swift
@inlinable public func closestEntryIndex(toOutput output: Output) -> Int?
-
Looks up the indices on
table
that approximate the given producer function towards zero, and returns the indices of the inputs that maximally approached zero.Returns an empty array if this lookup table is empty.
Expects
producer
to be a contiguous function mappingInput
intoOutput.Scalar
.Declaration
Swift
@inlinable public func approximateToZero( _ producer: (Output) -> Output.Scalar ) -> [Int]