summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-07-17 15:22:42 -0700
committerMuller, Alexander (A.) <amulle19@ford.com>2016-07-17 15:22:42 -0700
commit469648112a3950277c77d47b77be15ef5b4f4238 (patch)
tree9ec9cbd4b1d3a6c0be39344484ebc171700b8e34
parent4c7fc6736d262513c4bf428e43ed4fd0f0050afc (diff)
downloadsdl_ios-469648112a3950277c77d47b77be15ef5b4f4238.tar.gz
Removed unneeded function.
-rw-r--r--SmartDeviceLink/CGPoint_Util.h1
-rw-r--r--SmartDeviceLink/CGPoint_Util.m6
-rw-r--r--SmartDeviceLinkTests/UtilitiesSpecs/Touches/CGPointUtilSpec.m15
3 files changed, 0 insertions, 22 deletions
diff --git a/SmartDeviceLink/CGPoint_Util.h b/SmartDeviceLink/CGPoint_Util.h
index c960c3bb5..8b5815e0f 100644
--- a/SmartDeviceLink/CGPoint_Util.h
+++ b/SmartDeviceLink/CGPoint_Util.h
@@ -13,7 +13,6 @@
#include <CoreGraphics/CGGeometry.h>
CGPoint CGPointCenterOfPoints(CGPoint point1, CGPoint point2);
-CGPoint CGPointDisplacementOfPoints(CGPoint point1, CGPoint point2);
CGFloat CGPointDistanceBetweenPoints(CGPoint point1, CGPoint point2);
#endif /* CGPoint_Util_h */
diff --git a/SmartDeviceLink/CGPoint_Util.m b/SmartDeviceLink/CGPoint_Util.m
index 5df92d5d0..67be5c9fc 100644
--- a/SmartDeviceLink/CGPoint_Util.m
+++ b/SmartDeviceLink/CGPoint_Util.m
@@ -15,12 +15,6 @@ CGPoint CGPointCenterOfPoints(CGPoint point1, CGPoint point2) {
return CGPointMake(xCenter, yCenter);
}
-CGPoint CGPointDisplacementOfPoints(CGPoint point1, CGPoint point2) {
- CGFloat xDisplacement = point1.x - point2.x;
- CGFloat yDisplacement = point1.y - point2.y;
- return CGPointMake(xDisplacement, yDisplacement);
-}
-
CGFloat CGPointDistanceBetweenPoints(CGPoint point1, CGPoint point2) {
return hypotf(point1.x - point2.x, point1.y - point2.y);
} \ No newline at end of file
diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/CGPointUtilSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/CGPointUtilSpec.m
index c39e8c6b6..f4c227291 100644
--- a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/CGPointUtilSpec.m
+++ b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/CGPointUtilSpec.m
@@ -30,11 +30,6 @@ describe(@"CGPoint_Util Tests", ^{
expect(@(center.x)).to(equal(@200));
expect(@(center.y)).to(equal(@300));
});
- it(@"should properly calculate the displacement between points", ^{
- CGPoint displacement = CGPointDisplacementOfPoints(first, second);
- expect(@(displacement.x)).to(equal(@(-200)));
- expect(@(displacement.y)).to(equal(@(-200)));
- });
it(@"should properly calculate the distance between points", ^{
CGFloat distance = CGPointDistanceBetweenPoints(first, second);
expect(@(distance)).to(beCloseTo(@282.8427).within(0.0001));
@@ -51,11 +46,6 @@ describe(@"CGPoint_Util Tests", ^{
expect(@(center.x)).to(equal(@(-200)));
expect(@(center.y)).to(equal(@(-300)));
});
- it(@"should properly calculate the displacement between points", ^{
- CGPoint displacement = CGPointDisplacementOfPoints(first, second);
- expect(@(displacement.x)).to(equal(@200));
- expect(@(displacement.y)).to(equal(@200));
- });
it(@"should properly calculate the distance between points", ^{
CGFloat distance = CGPointDistanceBetweenPoints(first, second);
expect(@(distance)).to(beCloseTo(@282.8427).within(0.0001));
@@ -72,11 +62,6 @@ describe(@"CGPoint_Util Tests", ^{
expect(@(center.x)).to(equal(@(-100)));
expect(@(center.y)).to(equal(@(-100)));
});
- it(@"should properly calculate the displacement between points", ^{
- CGPoint displacement = CGPointDisplacementOfPoints(first, second);
- expect(@(displacement.x)).to(equal(@400));
- expect(@(displacement.y)).to(equal(@600));
- });
it(@"should properly calculate the distance between points", ^{
CGFloat distance = CGPointDistanceBetweenPoints(first, second);
expect(@(distance)).to(beCloseTo(@721.1103).within(0.0001));