Functions
The following functions are available globally.
-
Undocumented
Declaration
Swift
public func >>> (filter1: @escaping CIImageFilter.Filter, filter2: @escaping CIImageFilter.Filter) -> CIImageFilter.Filter
-
Executes the task on the main queue after a set amount of seconds.
Declaration
Swift
@discardableResult public func delay(_ seconds: TimeInterval, task: @escaping () -> Void) -> Task
Parameters
seconds
Delay in seconds.
task
Task to execute after delay.
Return Value
A delayed Task.
-
Executes the task on the main queue after a set amount of seconds.
Declaration
Swift
public func delayOnMainQueue(_ seconds: TimeInterval, task: @escaping () -> Void) -> Task
Parameters
seconds
Delay in seconds.
task
Task to execute after delay.
Return Value
A delayed Task.
-
Executes the task on a background queue after a set amount of seconds.
Declaration
Swift
public func delayOnBackgroundQueue(_ seconds: TimeInterval, task: @escaping () -> Void) -> Task
Parameters
seconds
Delay in seconds.
task
Task to execute after delay.
Return Value
A delayed Task.
-
Linearly interpolates between start and end by t. The parameter t is clamped to the range [0, 1]. When t = 0 returns start. When t = 1 return end. When t = 0.5 returns the midpoint of start and end.
Declaration
Swift
public func lerp(start: CGFloat, end: CGFloat, t: CGFloat) -> CGFloat
Parameters
start
The start value.
end
The end value.
t
The interpolation value between the two floats.
Return Value
The interpolated float result between the two float values.
-
Optional Assignment Operator
If the rhs is
.None
then this operator behaves as a no operation. If the rhs is `.Some(T) then this operator safely unwraps and binds the value so that it can be assigned to lhsDeclaration
Swift
public func =? <T>(lhs: inout T, rhs: T?)
Parameters
lhs
a non-optional varaible of a given type T
rhs
an optional value of type T?
-
Optional Assignment Operator
If the rhs is
.None
then this operator behaves as a no operation. If the rhs is `.Some(T) then this operator safely unwraps and binds the value so that it can be assigned to lhsDeclaration
Swift
public func =? <T>(lhs: inout T?, rhs: T?)
Parameters
lhs
a non-optional varaible of a given type T
rhs
an optional value of type T?
-
Undocumented
Declaration
Swift
public func ??? <T>(lhs: T?, defaultValue: @autoclosure () -> String) -> String