n/basis: remove superfluous abs
This commit is contained in:
parent
d9d7cd6f5b
commit
d9f4f5116c
@ -69,7 +69,7 @@ namespace util { namespace noise { namespace basis {
|
|||||||
auto p_int = p.template cast<intmax_t> ();
|
auto p_int = p.template cast<intmax_t> ();
|
||||||
if (p.x < 0) p_int.x -= 1;
|
if (p.x < 0) p_int.x -= 1;
|
||||||
if (p.y < 0) p_int.y -= 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
|
// generate the corner positions
|
||||||
auto p0 = p_int + util::vector<2,intmax_t> { 0, 0 };
|
auto p0 = p_int + util::vector<2,intmax_t> { 0, 0 };
|
||||||
|
@ -66,7 +66,7 @@ namespace util { namespace noise { namespace basis {
|
|||||||
auto p_int = p.template cast<intmax_t> ();
|
auto p_int = p.template cast<intmax_t> ();
|
||||||
if (p.x < 0) p_int.x -= 1;
|
if (p.x < 0) p_int.x -= 1;
|
||||||
if (p.y < 0) p_int.y -= 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
|
// generate the corner points
|
||||||
auto p0 = p_int + util::vector<2,intmax_t> { 0, 0 };
|
auto p0 = p_int + util::vector<2,intmax_t> { 0, 0 };
|
||||||
|
@ -69,7 +69,7 @@ namespace util { namespace noise { namespace basis {
|
|||||||
auto p_int = p.template cast<intmax_t> ();
|
auto p_int = p.template cast<intmax_t> ();
|
||||||
if (p.x < 0) p_int.x -= 1;
|
if (p.x < 0) p_int.x -= 1;
|
||||||
if (p.y < 0) p_int.y -= 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
|
// setup an array of distances
|
||||||
constexpr size_t RADIUS = 1;
|
constexpr size_t RADIUS = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user