Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_math_rotation.h')
-rw-r--r--source/blender/blenlib/BLI_math_rotation.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h
index d1f5fa89c3d..ee8c3d5e10c 100644
--- a/source/blender/blenlib/BLI_math_rotation.h
+++ b/source/blender/blenlib/BLI_math_rotation.h
@@ -39,6 +39,10 @@ extern "C" {
#define RAD2DEG(_rad) ((_rad)*(180.0/M_PI))
#define DEG2RAD(_deg) ((_deg)*(M_PI/180.0))
+
+#define RAD2DEGF(_rad) ((_rad)*(float)(180.0/M_PI))
+#define DEG2RADF(_deg) ((_deg)*(float)(M_PI/180.0))
+
/******************************** Quaternions ********************************/
/* stored in (w, x, y, z) order */
@@ -85,7 +89,7 @@ void rotation_between_quats_to_quat(float q[4], const float q1[4], const float q
void mat3_to_quat_is_ok(float q[4], float mat[3][3]);
/* other */
-void print_qt(char *str, float q[4]);
+void print_qt(const char *str, const float q[4]);
/******************************** Axis Angle *********************************/
@@ -181,6 +185,9 @@ void vec_apply_track(float vec[3], short axis);
float lens_to_angle(float lens);
float angle_to_lens(float angle);
+float angle_wrap_rad(float angle);
+float angle_wrap_deg(float angle);
+
#ifdef __cplusplus
}
#endif