std namespacing trig fns

This commit is contained in:
Lauren Budorick
2014-08-12 22:56:16 -07:00
parent 4de2aafd30
commit b2aa60baac
2 changed files with 5 additions and 7 deletions

View File

@@ -7,8 +7,6 @@
#include <mbgl/map/map.hpp>
#include <mbgl/map/transform.hpp>
#include <cmath>
using namespace mbgl;
void Painter::renderRaster(RasterBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id, const mat4 &matrix) {
@@ -85,12 +83,12 @@ void Painter::renderRaster(RasterBucket& bucket, std::shared_ptr<StyleLayer> lay
std::array<float, 3> Painter::spinWeights(float spin) {
spin *= M_PI / 180;
float s = sin(spin);
float c = cos(spin);
float s = std::sin(spin);
float c = std::cos(spin);
std::array<float, 3> spin_weights = {{
(2 * c + 1) / 3,
(-sqrtf(3.0) * s - c + 1) / 3,
(sqrtf(3.0) * s - c + 1) / 3
(-std::sqrtf(3.0) * s - c + 1) / 3,
(std::sqrtf(3.0) * s - c + 1) / 3
}};
return spin_weights;
}

View File

@@ -68,7 +68,7 @@ void RasterShader::setBrightness(float new_brightness_low, float new_brightness_
glUniform1f(u_brightness_low, new_brightness_low);
brightness_low = new_brightness_low;
}
if (brightness_high!= new_brightness_high) {
if (brightness_high != new_brightness_high) {
glUniform1f(u_brightness_high, new_brightness_high);
brightness_high = new_brightness_high;
}