CGPoint Extensions

Omar Albeik edited this page Dec 9, 2016 · 2 revisions

CGPoint extensions

Methods:

Name Return Description
distance(from point: CGPoint) CGFloat Distance from another CGPoint.
distance(from point1: CGPoint, to point2: CGPoint) CGFloat Distance between two CGPoints.

Operators:

Name Return Description
+ CGPoint Add two CGPoints.
- CGPoint Subtract two CGPoints.
* CGPoint Multiply a CGPoint with a scalar