input(after:)
The next input value after the given input.
Declaration
func input(after input: Self.FormatInput) -> Self.FormatInput?Return Value
The next “greater” input value that can be represented by FormatInput or an underlying representation the format style uses internally.
Discussion
Use this function to determine if the return value provided by discreteInput(before:) is precise enough for your use case for any input y:
guard let x = style.discreteInput(before: y) else {
return
}
let z = style.input(after: x) ?? yIf the distance between x and z is too large for the precision you require, you may want to manually probe format(_:) at a higher rate in that interval, as there is no guarantee for what the output will be in that interval.