Honeycomb  0.1
Component-Model Framework
Classes | Static Public Attributes | Friends | List of all members
honey::Ratio< Num, Den > Struct Template Reference

Class to hold compile-time finite rational numbers, ie. the fraction num / den. More...

#include <Ratio.h>

Classes

struct  add
 operator+ More...
 
struct  div
 operator/ More...
 
struct  equal
 operator== More...
 
struct  greater
 operator> More...
 
struct  greaterEqual
 operator>= More...
 
struct  less
 operator< More...
 
struct  lessEqual
 operator<= More...
 
struct  mul
 operator* More...
 
struct  notEqual
 operator!= More...
 
struct  sub
 operator- More...
 

Static Public Attributes

static const int64 num = Num * mt::sign<Den>::value / mt::gcd<Num,Den>::value
 
static const int64 den = mt::abs<Den>::value / mt::gcd<Num,Den>::value
 

Friends

struct Ratio
 

Detailed Description

template<int64 Num, int64 Den = 1>
struct honey::Ratio< Num, Den >

Class to hold compile-time finite rational numbers, ie. the fraction num / den.

Friends And Related Function Documentation

template<int64 Num, int64 Den = 1>
friend struct Ratio
friend

Member Data Documentation

template<int64 Num, int64 Den = 1>
const int64 honey::Ratio< Num, Den >::den = mt::abs<Den>::value / mt::gcd<Num,Den>::value
static
template<int64 Num, int64 Den = 1>
const int64 honey::Ratio< Num, Den >::num = Num * mt::sign<Den>::value / mt::gcd<Num,Den>::value
static

The documentation for this struct was generated from the following file: