Functions

The following functions are available globally.

  • Declaration

    Swift

    public func collision(_ a: CollisionDetectable, _ b: CollisionDetectable) -> Bool

    Return Value

    true if any convex polygons of one CollisionDetectable-conforming type intersect with another. Otherwise, false.

  • Negates each of the values of the given point.

    Declaration

    Swift

    public prefix func - (point: Point) -> Point
  • Declaration

    Swift

    public func * (point: Point, multiplier: Double) -> Point

    Return Value

    Point value containing the values of the given point each multiplied by the given multiplier.

  • Declaration

    Swift

    public func * (multiplicand: Double, point: Point) -> Point

    Return Value

    Point value containing the values of the given point each multiplied by the given multiplier.

  • Declaration

    Swift

    public func / (point: Point, divisor: Double) -> Point

    Return Value

    Point value containing the values of the given point each divided by the given divisor.

  • Declaration

    Swift

    public func * (lhs: Size, rhs: Double) -> Size

    Return Value

    Size scaled by the given right-hand-side value.

  • Declaration

    Swift

    public func * (lhs: Double, rhs: Size) -> Size

    Return Value

    Size scaled by the given left-hand-side value.