blob: a95c353c789358c6e98f415cd9a398982fc1e95a (
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 <CoreGraphics/CGGeometry.h>
#include <stdio.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 */
|