def to_euler_rad(self, dst_euler_vec3=None):
        """Returns euler angles

        dst_euler_vec3 is an optional destination vector.
        """

        euler_vec3 = dst_euler_vec3 or Vec3(0.0, 0.0, 0.0)

        # TODO consolidated duplicated code in this function and to_euler_deg()
        sqw = self.w * self.w
        sqx = self.x * self.x
        sqy = self.y * self.y
        sqz = self.z * self.z

        euler_vec3.z = math.atan2(2.0 * (self.x * self.y + self.z * self.w),
                                  (sqx - sqy - sqz + sqw))
        euler_vec3.x = math.atan2(2.0 * (self.y * self.z + self.x * self.w),
                                  (-sqx - sqy + sqz + sqw))
        euler_vec3.y = math.asin(-2.0 * (self.x * self.z - self.y * self.w))
        return euler_vec3