diff --git a/src/lol/math/vector.h b/src/lol/math/vector.h
index 9df2077a..86bb5176 100644
--- a/src/lol/math/vector.h
+++ b/src/lol/math/vector.h
@@ -923,6 +923,8 @@ template <typename T> struct Quat
 
     static Quat<T> rotate(T angle, T x, T y, T z);
     static Quat<T> rotate(T angle, Vec3<T> const &v);
+    static Quat<T> fromeuler(T x, T y, T z);
+    static Quat<T> fromeuler(Vec3<T> const &v);
 
     inline Quat<T> operator *(Quat<T> const &val) const
     {
diff --git a/src/math/vector.cpp b/src/math/vector.cpp
index 0c24448d..3a77ffe4 100644
--- a/src/math/vector.cpp
+++ b/src/math/vector.cpp
@@ -470,6 +470,27 @@ template<> quat quat::rotate(float angle, float x, float y, float z)
     return quat::rotate(angle, vec3(x, y, z));
 }
 
+template<> quat quat::fromeuler(vec3 const &v)
+{
+    using std::sin;
+    using std::cos;
+
+    vec3 half_angles = (M_PI / 360.0f) * v;
+    float sx = sin(half_angles.x), cx = cos(half_angles.x);
+    float sy = sin(half_angles.y), cy = cos(half_angles.y);
+    float sz = sin(half_angles.z), cz = cos(half_angles.z);
+
+    return quat(cx * cy * cz + sx * sy * sz,
+                sx * cy * cz - cx * sy * sz,
+                cx * sy * cz + sx * cy * sz,
+                cx * cy * sz - sx * sy * cz);
+}
+
+template<> quat quat::fromeuler(float x, float y, float z)
+{
+    return quat::fromeuler(vec3(x, y, z));
+}
+
 template<> mat4 mat4::lookat(vec3 eye, vec3 center, vec3 up)
 {
     vec3 v3 = normalize(eye - center);