Functions

The following functions are available globally.

Operators

  • SwifterSwift: Square root of double.

    Declaration

    Swift

    public prefix func  (double: Double) -> Double

    Parameters

    double

    double value to find square root for.

    Return Value

    square root of given double.

  • SwifterSwift: Square root of float.

    Declaration

    Swift

    public prefix func  (float: Float) -> Float

    Parameters

    float

    float value to find square root for

    Return Value

    square root of given float.

  • SwifterSwift: Tuple of plus-minus operation.

    Declaration

    Swift

    public prefix func ± <T>(number: T) -> (T, T) where T : FloatingPoint

    Parameters

    int

    number

    Return Value

    tuple of plus-minus operation (± 2.5 -> (2.5, -2.5)).

  • SwifterSwift: Square root of integer.

    Declaration

    Swift

    public prefix func  (int: Int) -> Double

    Parameters

    int

    integer value to find square root for

    Return Value

    square root of given integer.

  • SwifterSwift: Tuple of plus-minus operation.

    Declaration

    Swift

    public prefix func ± (int: Int) -> (Int, Int)

    Parameters

    int

    integer number

    Return Value

    tuple of plus-minus operation (example: ± 2 -> (2, -2)).