summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2015-08-14 19:34:13 +0300
committerAnsis Brammanis <brammanis@gmail.com>2015-08-24 18:41:50 -0400
commit554425b753c1eee6b6874f1ddde0c266a717c88e (patch)
tree85469fd9195538c314933f29b859c510793729ca /include
parentbc92c2de3988a39d6def34617ade4afb5b82e214 (diff)
downloadqtlocation-mapboxgl-554425b753c1eee6b6874f1ddde0c266a717c88e.tar.gz
fix earthquakes in perspective view
Use higher precision for matrix calculations so that the map does not jump around while zooming.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/util/mat4.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/mbgl/util/mat4.hpp b/include/mbgl/util/mat4.hpp
index e59712ed0d..ea4854306c 100644
--- a/include/mbgl/util/mat4.hpp
+++ b/include/mbgl/util/mat4.hpp
@@ -27,18 +27,18 @@
namespace mbgl {
-typedef std::array<float, 16> mat4;
+typedef std::array<double, 16> mat4;
namespace matrix {
void identity(mat4& out);
-void ortho(mat4& out, float left, float right, float bottom, float top, float near, float far);
-void perspective(mat4& out, float fovy, float aspect, float near, float far);
+void ortho(mat4& out, double left, double right, double bottom, double top, double near, double far);
+void perspective(mat4& out, double fovy, double aspect, double near, double far);
void copy(mat4& out, const mat4& a);
-void translate(mat4& out, const mat4& a, float x, float y, float z);
-void rotate_x(mat4& out, const mat4& a, float rad);
-void rotate_z(mat4& out, const mat4& a, float rad);
-void scale(mat4& out, const mat4& a, float x, float y, float z);
+void translate(mat4& out, const mat4& a, double x, double y, double z);
+void rotate_x(mat4& out, const mat4& a, double rad);
+void rotate_z(mat4& out, const mat4& a, double rad);
+void scale(mat4& out, const mat4& a, double x, double y, double z);
void multiply(mat4& out, const mat4& a, const mat4& b);
}