_fixed.h File Reference

#include <cmath>

Go to the source code of this file.

Classes

class  fixed_base< T, FIXED_BITS >
 Fixed-point template base class. More...
class  fixed_base< T, FIXED_BITS >::raw

Defines

#define ETL_FIXED_TYPE   int
#define ETL_FIXED_BITS   12
#define ETL_FIXED_EPSILON   _EPSILON()
#define ETL_ATTRIB_CONST
#define ETL_ATTRIB_PURE
#define ETL_ATTRIB_INLINE

Typedefs

typedef fixed_base< ETL_FIXED_TYPE,
ETL_FIXED_BITS > 
fixed

Functions

template<typename T, unsigned int FIXED_BITS>
_ETL_END_NAMESPACE _STD_BEGIN_NAMESPACE
_ETL::fixed_base< T, FIXED_BITS > 
abs (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > cos (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > cosh (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > exp (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > log (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > log10 (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > pow (const _ETL::fixed_base< T, FIXED_BITS > &, int)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > pow (const _ETL::fixed_base< T, FIXED_BITS > &, const T &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > pow (const _ETL::fixed_base< T, FIXED_BITS > &, const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > sin (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > sinh (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > sqrt (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > tan (const _ETL::fixed_base< T, FIXED_BITS > &)
template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > tanh (const _ETL::fixed_base< T, FIXED_BITS > &)
template<class T, unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > operator * (const float &lhs, const fixed_base< T, FIXED_BITS > &rhs)
 float * fixed
template<class T, unsigned int FIXED_BITS>
fixed_base< T, FIXED_BITS > operator * (const double &lhs, const fixed_base< T, FIXED_BITS > &rhs)
 double * fixed
template<class T, unsigned int FIXED_BITS>
_ETL_END_NAMESPACE _STD_BEGIN_NAMESPACE
_ETL::fixed_base< T, FIXED_BITS > 
ceil (const _ETL::fixed_base< T, FIXED_BITS > &rhs)
template<class T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > floor (const _ETL::fixed_base< T, FIXED_BITS > &rhs)
template<class T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > round (const _ETL::fixed_base< T, FIXED_BITS > &rhs)


Define Documentation

#define ETL_FIXED_TYPE   int
 

======================================================================== Extended Template and Library Fixed-Point Math Class Implementation

Id
_fixed.h,v 1.1.1.1 2005/01/04 01:31:47 darco Exp

Copyright (c) 2002 Robert B. Quattlebaum Jr.

This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

=== N O T E S ===========================================================

This is an internal header file, included by other ETL headers. You should not attempt to use it directly.

=========================================================================

Definition at line 37 of file _fixed.h.

#define ETL_FIXED_BITS   12
 

Definition at line 41 of file _fixed.h.

#define ETL_FIXED_EPSILON   _EPSILON()
 

Definition at line 45 of file _fixed.h.

#define ETL_ATTRIB_CONST
 

Definition at line 53 of file _fixed.h.

#define ETL_ATTRIB_PURE
 

Definition at line 54 of file _fixed.h.

#define ETL_ATTRIB_INLINE
 

Definition at line 55 of file _fixed.h.


Typedef Documentation

typedef fixed_base<ETL_FIXED_TYPE,ETL_FIXED_BITS> fixed
 

Definition at line 535 of file _fixed.h.


Function Documentation

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > abs const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

Definition at line 558 of file _fixed.h.

Referenced by surface< T, AT, VP >::surface().

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> cos const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

Referenced by surface< T, AT, VP >::cosine_sample().

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> cosh const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> exp const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> log const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> log10 const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> pow const _ETL::fixed_base< T, FIXED_BITS > &  ,
int 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> pow const _ETL::fixed_base< T, FIXED_BITS > &  ,
const T & 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base< T, FIXED_BITS > pow const _ETL::fixed_base< T, FIXED_BITS > &  ,
const _ETL::fixed_base< T, FIXED_BITS > & 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> sin const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

Referenced by angle::sin::get().

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> sinh const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> sqrt const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

Referenced by distance_func< value_type >::uncook().

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> tan const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

Referenced by angle::tan::get().

template<typename T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> tanh const _ETL::fixed_base< T, FIXED_BITS > &   ) 
 

template<class T, unsigned int FIXED_BITS>
fixed_base<T,FIXED_BITS> operator * const float &  lhs,
const fixed_base< T, FIXED_BITS > &  rhs
 

float * fixed

Definition at line 426 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
fixed_base<T,FIXED_BITS> operator * const double &  lhs,
const fixed_base< T, FIXED_BITS > &  rhs
 

double * fixed

Definition at line 433 of file _fixed.h.

template<class T, unsigned int FIXED_BITS>
_ETL_END_NAMESPACE _STD_BEGIN_NAMESPACE _ETL::fixed_base<T,FIXED_BITS> ceil const _ETL::fixed_base< T, FIXED_BITS > &  rhs  )  [inline]
 

Definition at line 543 of file _fixed.h.

Referenced by ceil_to_int().

template<class T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> floor const _ETL::fixed_base< T, FIXED_BITS > &  rhs  ) 
 

Definition at line 548 of file _fixed.h.

Referenced by surface< T, AT, VP >::cubic_sample(), fastangle::dist(), fastangle::mod(), fastangle::operator~(), angle::operator~(), angle::rot_floor(), surface< T, AT, VP >::sample_rect(), surface< T, AT, VP >::sample_rect_clip(), and clock_desc_gettimeofday::seconds_to_timestamp().

template<class T, unsigned int FIXED_BITS>
_ETL::fixed_base<T,FIXED_BITS> round const _ETL::fixed_base< T, FIXED_BITS > &  rhs  ) 
 

Definition at line 553 of file _fixed.h.


Generated on Thu Jan 12 03:51:42 2006 for ETL by  doxygen 1.4.6