n/b/patch: remove broken fastmath calls

This commit is contained in:
Danny Robson 2015-09-29 17:35:11 +10:00
parent 464c703ffd
commit 5a8201f78b

View File

@ -22,7 +22,6 @@
#include "../../types.hpp" #include "../../types.hpp"
#include "../../ray.hpp" #include "../../ray.hpp"
#include "../../vector.hpp" #include "../../vector.hpp"
#include "../../maths/fast.hpp"
namespace util { namespace noise { namespace basis { namespace util { namespace noise { namespace basis {
@ -75,7 +74,7 @@ namespace util { namespace noise { namespace basis {
T distances[COUNT]; T distances[COUNT];
for (size_t i = 0; i < COUNT; ++i) for (size_t i = 0; i < COUNT; ++i)
distances[i] = maths::fast::sqrt (util::distance2 (p_rem, centres[i])); distances[i] = std::sqrt (util::distance2 (p_rem, centres[i]));
// sort the distances, using indices so we can use 'offsets' to generate values // sort the distances, using indices so we can use 'offsets' to generate values
unsigned indices[COUNT]; unsigned indices[COUNT];
@ -104,7 +103,7 @@ namespace util { namespace noise { namespace basis {
{ {
auto v = generate (p_int + OFFSETS[indices[i]]); auto v = generate (p_int + OFFSETS[indices[i]]);
auto d = (distances[indices[i]] - lo) / (hi - lo); auto d = (distances[indices[i]] - lo) / (hi - lo);
auto w = maths::fast::pow (1-d, m_power); auto w = std::pow (1-d, m_power);
sumw += w; sumw += w;
out += v * w; out += v * w;