The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Functions
floating_point_emulation::detail Namespace Reference

Classes

struct  tfloor
 
struct  tfloor< double, S >
 
struct  tfloor< Sint32, S >
 
struct  tidiv
 
struct  tidiv< T, 8 >
 
struct  tscale
 
struct  tscale< double, S, typename boost::enable_if_c< S!=0 >::type >
 
struct  tscale< Sint32, S, typename boost::enable_if_c< S!=0 >::type >
 
struct  tscale< T, 0 >
 

Functions

template<class T , unsigned S>
load (int value)
 
template<class T , unsigned S>
load (double value)
 
template<class R , class T , unsigned S>
store (T value)
 
void sal (double &lhs, unsigned rhs)
 Shift arithmetically left. More...
 
void sal (Sint32 &lhs, unsigned rhs)
 Shift arithmetically left. More...
 
void sar (double &lhs, unsigned rhs)
 Shift arithmetically right. More...
 
void sar (Sint32 &lhs, unsigned rhs)
 Shift arithmetically right. More...
 

Function Documentation

template<class T , unsigned S>
T floating_point_emulation::detail::load ( int  value)
inline
template<class T , unsigned S>
T floating_point_emulation::detail::load ( double  value)
inline

Definition at line 237 of file floating_point_emulation.hpp.

void floating_point_emulation::detail::sal ( double &  lhs,
unsigned  rhs 
)
inline

Shift arithmetically left.

Shifting of floating point values doesn't exist so it's emulated by a multiplication. This function allows tidiv::idiv() to contain generic code.

Parameters
lhsThe value to `shift'.
rhsThe number of bits to `shift'.

Definition at line 287 of file floating_point_emulation.hpp.

Referenced by floating_point_emulation::detail::tidiv< T, 8 >::idiv().

void floating_point_emulation::detail::sal ( Sint32 &  lhs,
unsigned  rhs 
)
inline

Shift arithmetically left.

Parameters
lhsThe value to shift.
rhsThe number of bits to shift.

Definition at line 299 of file floating_point_emulation.hpp.

void floating_point_emulation::detail::sar ( double &  lhs,
unsigned  rhs 
)
inline

Shift arithmetically right.

Shifting of floating point values doesn't exist so it's emulated by a division. This function allows tidiv::idiv() to contain generic code.

Parameters
lhsThe value to `shift'.
rhsThe number of bits to `shift'.

Definition at line 315 of file floating_point_emulation.hpp.

Referenced by floating_point_emulation::detail::tidiv< T, 8 >::idiv().

void floating_point_emulation::detail::sar ( Sint32 &  lhs,
unsigned  rhs 
)
inline

Shift arithmetically right.

Parameters
lhsThe value to shift.
rhsThe number of bits to shift.

Definition at line 327 of file floating_point_emulation.hpp.

template<class R , class T , unsigned S>
R floating_point_emulation::detail::store ( value)
inline