ETL  0.04.19
Functions
_misc.h File Reference
#include <cmath>
#include <math.h>

Go to the source code of this file.

Functions

template<typename I , typename T >
_ETL_BEGIN_NAMESPACEbinary_find (I begin, I end, const T &value)
int round_to_int (const float x)
int round_to_int (const double x)
int ceil_to_int (const float x)
int ceil_to_int (const double x)
int floor_to_int (const float x)
int floor_to_int (const double x)

Function Documentation

template<typename I , typename T >
_ETL_BEGIN_NAMESPACE I binary_find ( begin,
end,
const T &  value 
)
inline

======================================================================== Extended Template and Library Misc $Id$

Copyright (c) 2002 Robert B. Quattlebaum Jr. Copyright (c) 2007 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 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 ===========================================================


Definition at line 42 of file _misc.h.

Referenced by smach< CON, K, M >::state< T >::find().

int round_to_int ( const float  x)
inline
Todo:
Isn't there some x86 FPU instruction for quickly converting a float to a rounded integer? It's worth looking into at some point...

Definition at line 75 of file _misc.h.

int round_to_int ( const double  x)
inline

Definition at line 84 of file _misc.h.

int ceil_to_int ( const float  x)
inline

Definition at line 91 of file _misc.h.

References ceil().

int ceil_to_int ( const double  x)
inline

Definition at line 92 of file _misc.h.

References ceil().

int floor_to_int ( const float  x)
inline
int floor_to_int ( const double  x)
inline

Definition at line 95 of file _misc.h.