From 1c9c38e9a744f4d76ccff5d19ef700bbec8308b8 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 26 May 2015 16:54:53 +1000 Subject: [PATCH] n/basis: style, whitespace --- noise/basis.hpp | 91 ++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/noise/basis.hpp b/noise/basis.hpp index 6cb6c514..721ae581 100644 --- a/noise/basis.hpp +++ b/noise/basis.hpp @@ -21,63 +21,62 @@ #include "lerp.hpp" #include "../range.hpp" -namespace util { - namespace noise { - template using lerp_t = T (*)(T,T,T); - - template - struct basis { - typedef uint64_t seed_t; - - basis (seed_t); - basis (); - virtual ~basis (); - - seed_t seed; - - virtual range bounds (void) const = 0; - virtual T operator() (T x, T y) const = 0; - }; +namespace util { namespace noise { + template using lerp_t = T (*)(T,T,T); - /// Single value per grid space - template > - struct value : public basis { - using seed_t = typename basis::seed_t; + template + struct basis { + typedef uint64_t seed_t; - value (seed_t); - value (); + basis (seed_t); + basis (); + virtual ~basis (); - virtual range bounds (void) const final; - virtual T operator() (T x, T y) const final; - }; + seed_t seed; + + virtual range bounds (void) const = 0; + virtual T operator() (T x, T y) const = 0; + }; - /// Perlin: interpolated value across each grid space - template L> - struct gradient : public basis { - using seed_t = typename basis::seed_t; + /// Single value per grid space + template > + struct value : public basis { + using seed_t = typename basis::seed_t; - gradient (seed_t); - gradient (); + value (seed_t); + value (); - virtual range bounds (void) const final; - virtual T operator() (T x, T y) const final; - }; + virtual range bounds (void) const final; + virtual T operator() (T x, T y) const final; + }; - /// Cellular/Worley/Vornoi of order-1 - template - struct cellular : public basis { - using seed_t = typename basis::seed_t; + /// Perlin: interpolated value across each grid space + template L> + struct gradient : public basis { + using seed_t = typename basis::seed_t; - cellular (seed_t); - cellular (); + gradient (seed_t); + gradient (); - virtual range bounds (void) const final; - virtual T operator() (T x, T y) const final; - }; - } -} + virtual range bounds (void) const final; + virtual T operator() (T x, T y) const final; + }; + + + /// Cellular/Worley/Vornoi of order-1 + template + struct cellular : public basis { + using seed_t = typename basis::seed_t; + + cellular (seed_t); + cellular (); + + virtual range bounds (void) const final; + virtual T operator() (T x, T y) const final; + }; +} } #endif