n/basis: remove superfluous abs

This commit is contained in:
Danny Robson 2015-06-17 03:05:16 +10:00
parent d9d7cd6f5b
commit d9f4f5116c
3 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ namespace util { namespace noise { namespace basis {
auto p_int = p.template cast<intmax_t> ();
if (p.x < 0) p_int.x -= 1;
if (p.y < 0) p_int.y -= 1;
auto p_rem = abs (p - p_int);
auto p_rem = p - p_int;
// generate the corner positions
auto p0 = p_int + util::vector<2,intmax_t> { 0, 0 };

View File

@ -66,7 +66,7 @@ namespace util { namespace noise { namespace basis {
auto p_int = p.template cast<intmax_t> ();
if (p.x < 0) p_int.x -= 1;
if (p.y < 0) p_int.y -= 1;
auto p_rem = abs (p - p_int);
auto p_rem = p - p_int;
// generate the corner points
auto p0 = p_int + util::vector<2,intmax_t> { 0, 0 };

View File

@ -69,7 +69,7 @@ namespace util { namespace noise { namespace basis {
auto p_int = p.template cast<intmax_t> ();
if (p.x < 0) p_int.x -= 1;
if (p.y < 0) p_int.y -= 1;
auto p_rem = abs (p - p_int).template as<point> ();
auto p_rem = (p - p_int).template as<point> ();
// setup an array of distances
constexpr size_t RADIUS = 1;