summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/CGPoint_Util.h
blob: 9ea06e1b635df93101ec3a7a3300159d99991c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
//  CGPoint_Util.h
//  SmartDeviceLink-iOS
//
//  Created by Muller, Alexander (A.) on 6/14/16.
//  Copyright © 2016 smartdevicelink. All rights reserved.
//

#ifndef CGPoint_Util_h
#define CGPoint_Util_h

#include <stdio.h>
#include <CoreGraphics/CGGeometry.h>

/**
 *  @abstract
 *      Calculate the center of two points.
 *  @param point1
 *      First point.
 *  @param point2
 *      Second point.
 *  @return CGPoint
 *      Center of the points.
 */
CGPoint CGPointCenterOfPoints(CGPoint point1, CGPoint point2);

/**
 *  @abstract
 *      Calculate the distance between two points.
 *  @param point1
 *      First point.
 *  @param point2
 *      Second point.
 *  @return CGFloat
 *      Distance between the points.
 */
CGFloat CGPointDistanceBetweenPoints(CGPoint point1, CGPoint point2);

#endif /* CGPoint_Util_h */