proj home

Files   Classes   Functions   Hierarchy  

fixedpointtest Class Reference

Test fixedpoint class. More...

#include <fixedpointtest.h>

List of all members.

Static Public Member Functions

static void test02 ()
static void test03 ()


Detailed Description

Test fixedpoint class.

Definition at line 7 of file fixedpointtest.h.


Member Function Documentation

void fixedpointtest::test02 (  )  [static]

Definition at line 44 of file fixedpointtest.cpp.

References fixedpoint< F, N >::inc().

Referenced by main().

00045 {
00046 
00047   fixedpoint< f2, 2 > p;
00048 
00049   double x0[2];
00050   double x[2];
00051 
00052   x0[0] = 20.0;
00053   x0[1] = -20.0;
00054 
00055   p.inc(x,x0);
00056 
00057   cout << x0[0] << " " << x0[1] << endl;
00058   cout << x[0] << " " << x[1] << endl;
00059 
00060   x0[0] = x[0]; x0[1]=x[1];
00061   p.inc(x,x0);
00062   cout << x[0] << " " << x[1] << endl;
00063 
00064 }

void fixedpointtest::test03 (  )  [static]

Definition at line 153 of file fixedpointtest.cpp.

References fixedpoint< F, N >::f, and fixedpoint< F, N >::inc().

Referenced by main().

00154 {
00155   fixedpoint< arm, 2 > p;
00156 
00157   arm & f(p.f);
00158 
00159   f.a = 3.0;
00160   f.b = 2.0;
00161   f.px = 4.0;
00162   f.py = 1.0;
00163 
00164   double x0[2];
00165   double x[2];
00166 
00167   x0[0] = 1.0;
00168   x0[1] = 0.0;
00169 
00170 
00171   unsigned int imax = 8;
00172   for (unsigned int i=0; i<imax; ++i)
00173   {
00174 
00175     x0[0] = x[0]; x0[1]=x[1];
00176     p.inc(x,x0);
00177     cout << x[0] << " " << x[1] << endl;
00178   }
00179 
00180   f.print(x);
00181 }


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:49:56 2011 for Chelton Evans Source by  doxygen 1.5.8