From d1b0ca47d4ca6220458d65e16e827328ddc96f96 Mon Sep 17 00:00:00 2001 From: jwellbelove Date: Mon, 20 Oct 2014 13:58:13 +0100 Subject: [PATCH] Changed math log case. --- math.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/math.h b/math.h index 2ade416f..0f392009 100644 --- a/math.h +++ b/math.h @@ -34,19 +34,19 @@ SOFTWARE. namespace etl { //*************************************************************************** - /// The base generic Log template. + /// The base generic log template. /// Defines 'value' as the log of the number at the specified base. /// The result is rounded down to the next integer. ///\tparam N The number to find the log of. ///\tparam BASE The base of the log. //*************************************************************************** template - struct Log + struct log { - enum Value + enum value_type { // Recursive definition. - value = (N >= BASE) ? 1 + Log::value : 0 + value = (N >= BASE) ? 1 + log::value : 0 }; }; @@ -54,9 +54,9 @@ namespace etl /// Specialisation for N = 1 //*************************************************************************** template - struct Log<1, BASE> + struct log<1, BASE> { - enum Value + enum value_type { value = 0 }; @@ -66,9 +66,9 @@ namespace etl /// Specialisation for N = 0 //*************************************************************************** template - struct Log<0, BASE> + struct log<0, BASE> { - enum Value + enum value_type { value = 0 }; @@ -80,9 +80,9 @@ namespace etl template struct Log2 { - enum Value + enum value_type { - value = Log::value + value = log::value }; }; @@ -92,9 +92,9 @@ namespace etl template struct Log10 { - enum Value + enum value_type { - value = Log::value + value = log::value }; }; }