n/f/hetero: add offset getter/setter

This commit is contained in:
Danny Robson 2015-08-28 21:08:16 +10:00
parent 4e623262ad
commit 7733bc1b74
2 changed files with 21 additions and 0 deletions

View File

@ -48,6 +48,9 @@ namespace util { namespace noise { namespace fractal {
hetero (seed_t);
constexpr T offset (void) const;
T offset (T);
T operator() (util::point<2,T>) const;
private:

View File

@ -55,6 +55,24 @@ namespace util { namespace noise { namespace fractal {
{ ; }
///////////////////////////////////////////////////////////////////////////
template <typename T, typename B>
constexpr T
hetero<T,B>::offset (void) const
{
return m_offset;
}
//-------------------------------------------------------------------------
template <typename T, typename B>
T
hetero<T,B>::offset (T _offset)
{
return m_offset = _offset;
}
///////////////////////////////////////////////////////////////////////////
template <typename T, typename B>
T