00001 /*****************************************************************************\ 00002 * * 00003 * Name : test_angle * 00004 * Author : Chris Koeritz * 00005 * * 00006 * Purpose: * 00007 * * 00008 * Tests the angle class. * 00009 * * 00010 ******************************************************************************* 00011 * Copyright (c) 2001-$now By Author. This program is free software; you can * 00012 * redistribute it and/or modify it under the terms of the GNU General Public * 00013 * License as published by the Free Software Foundation; either version 2 of * 00014 * the License or (at your option) any later version. This is online at: * 00015 * http://www.fsf.org/copyleft/gpl.html * 00016 * Please send any updates to: fred@gruntose.com * 00017 \*****************************************************************************/ 00018 00019 #include <geometric/angle.cpp> 00020 #include <data_struct/static_memory_gremlin.h> 00021 00022 HOOPLE_STARTUP_CODE; 00023 00024 using namespace geometric; 00025 00026 int main(int formal(argc), char *formal(argv)[]) 00027 { 00028 { 00029 // first test group: double angle. 00030 angle<double> a(30.3, angle<double>::DEGREES); 00031 00032 outcome retval; 00033 angle<double> at = angle<double>::arctangent(28.3, 29.5, retval); 00034 angle<double> as = angle<double>::arcsine(28.3, 29.5, retval); 00035 angle<double> ac = angle<double>::arccosine(28.3, 29.5, retval); 00036 00037 //hmmm: this needs to actually do something. 00038 // how about tests on particular places on the circle that are known. 00039 // maybe some known value computations would be nice. 00040 // use all floatplus for the values. 00041 00042 } 00043 00044 guards::alert_message("angle:: works for those functions tested."); 00045 return 0; 00046 } 00047 00048
1.5.1