Operator

+(_:)

Returns the given number unchanged.

Declaration

Return Value

The given argument without any changes.

Discussion

You can use the unary plus operator (+) to provide symmetry in your code for positive numbers when also using the unary minus operator.

let x = -21
let y = +21
// x == -21
// y == 21

See Also

Performing Mathmatical Operations

func negate()

Replaces this value with its additive inverse.

static func *= (inout DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride)

Multiplies the values of the two arguments, and assigns the result to the first argument.

static func += (inout DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride)

Adds the values of the two arguments, and assigns the result to the first argument.

static func - (DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride) -> DispatchQueue.SchedulerTimeType.Stride

Returns the result of subtracting the value of the second argument from the value of the first.

static func -= (inout DispatchQueue.SchedulerTimeType.Stride, DispatchQueue.SchedulerTimeType.Stride)

Subtracts the value of the second argument from the value of the first, and assigns the result to the first argument.