Functions
The following functions are available globally.
-
Execute the task closure on specified queue after delayed seconds.
Declaration
Swift
@discardableResult public func delay(_ delayedSeconds: TimeInterval, queue: DispatchQueue = .global(), task: @escaping () -> Void) -> DelayTaskParameters
delayedSecondsThe delayed seconds.
queueThe dispatch queue to run on.
taskThe closure to run.
-
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<T>(start: T, end: T, t: T) -> T where T : BinaryFloatingPointParameters
startThe start value.
endThe end value.
tThe interpolation value between the two floats.
Return Value
The interpolated float result between the two float values.
-
Optional Assignment Operator
If the rhs is
.Nonethen 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
lhsa non-optional variable of a given type T
rhsan optional value of type T?
-
Optional Assignment Operator
If the rhs is
.Nonethen 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
lhsa non-optional variable of a given type T
rhsan optional value of type T?
-
Undocumented
Declaration
Swift
public func ??? <T>(lhs: T?, defaultValue: @autoclosure () -> String) -> String
Functions Reference