CGPoint

struct CGPoint

This extesion adds some useful functions to CGPoint.

  • Returns the distance between another CGPoint.

    Declaration

    Swift

    public func distanceTo(_ point: CGPoint) -> CGFloat

    Parameters

    point

    CGPoint to be used to calculate the distance.

    Return Value

    Returns the distance between another CGPoint.