cgv
Loading...
Searching...
No Matches
one.h
1#pragma once
2
3#include <cgv/type/traits/max.h>
4
5namespace cgv {
6 namespace type {
7 namespace traits {
10 template <typename T> struct one { static const T value = max<T>::value; };
11
14 template <typename T> struct one_fct { static T get_value() { return one<T>::value; } };
15 template <> struct one_fct<float> { static float get_value() { return 1.0f; } };
16 template <> struct one_fct<double> { static double get_value() { return 1.0; } };
17 }
18 }
19}
the cgv namespace
Definition print.h:11
the max traits defines for each type in the static const member value, what the maximum value is.
Definition max.h:37
the one_fct traits provides a static function returning the value of a type that is interpreted as on...
Definition one.h:14
the one traits defines for each type in the static const member value, what the value of one is.
Definition one.h:10