X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2Ftest%2Fangle.cpp;h=a0ecac62c36fad1d64fb814bb0f488c1bfc015a8;hb=23e5da9323034dea30574344e74c8c03b0cb063e;hp=80c5569e69d61f4af6e6302063879c8bec482e15;hpb=36d01e1527fda602a9aed07d209eb34e6770bca8;p=synfig.git diff --git a/ETL/trunk/test/angle.cpp b/ETL/trunk/test/angle.cpp index 80c5569..a0ecac6 100644 --- a/ETL/trunk/test/angle.cpp +++ b/ETL/trunk/test/angle.cpp @@ -4,6 +4,7 @@ ** $Id$ ** ** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -422,17 +423,17 @@ int angle_test() dist=angle::deg(angle::deg(330).dist(angle::deg(30))).get(); printf("angle: angular difference between 330deg and 30deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=-60) + if(floor(dist+0.5)!=300) { - printf("angle: error: should be -60deg!\n"); + printf("angle: error: should be 300deg!\n"); ret++; } dist=angle::deg(angle::deg(30).dist(angle::deg(330))).get(); printf("angle: angular difference between 30deg and 330deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=60) + if(floor(dist+0.5)!=-300) { - printf("angle: error: should be 60deg!\n"); + printf("angle: error: should be -300deg!\n"); ret++; } @@ -462,9 +463,9 @@ int angle_test() dist=angle::deg(angle::deg(20).dist(angle::deg(205))).get(); printf("angle: angular difference between 20deg and 205deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=175) + if(floor(dist+0.5)!=-185) { - printf("angle: error: should be 175deg!\n"); + printf("angle: error: should be -185deg!\n"); ret++; } @@ -473,7 +474,7 @@ int angle_test() for(i=-1000;i<1000;i++) { dist=angle::deg(angle::deg(20+i+360).dist(angle::deg(205+i-360))).get(); - if(floor(dist+0.5)!=175) + if(floor(dist+0.5)!=535) { printf("angle: error: Badness at %d!\n",i); ret++; @@ -484,7 +485,7 @@ int angle_test() for(i=-1000;i<1000;i++) { dist=angle::deg(angle::deg(20+i-360).dist(angle::deg(195+i+360))).get(); - if(floor(dist+0.5)!=-175) + if(floor(dist+0.5)!=-895) { printf("angle: error: Badness at %d!\n",i); ret++;