Pi

Allows to represent fractions of PI without using the usual suffixes such as "two", "half", etc.

template Pi (
int a
int b = 1
) {
enum Pi;
}

Examples

static assert(Pi!(2,1) == Pi!(4,2));
static assert(Pi!(1,2) == Pi!(1,8) * 4);
static assert(Pi!(4,2) == Pi!2);

Meta