[Bf-blender-cvs] [830a45a18a7] master: Improve usage of recent golden ratio define
Philipp Oeser
noreply at git.blender.org
Thu Feb 27 10:57:33 CET 2020
Commit: 830a45a18a71ac50ca23b58d2524ce8ec3d102fe
Author: Philipp Oeser
Date: Thu Feb 27 10:52:34 2020 +0100
Branches: master
https://developer.blender.org/rB830a45a18a71ac50ca23b58d2524ce8ec3d102fe
Improve usage of recent golden ratio define
- fix typo
- set back to conjugate value and use as such
Followup to rB95175c3b5e2b.
===================================================================
M source/blender/editors/space_view3d/view3d_draw.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 058b33a5822..4ff8a9a3884 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -98,7 +98,7 @@
#include "view3d_intern.h" /* own include */
-#define M_GOLDEN_RATION_CONJUGATE 1.618033988749895f
+#define M_GOLDEN_RATIO_CONJUGATE 0.618033988749895f
/* -------------------------------------------------------------------- */
/** \name General Functions
@@ -452,7 +452,7 @@ static void drawviewborder_triangle(
if (w > h) {
if (golden) {
- ofs = w * (1.0f - (1.0f / M_GOLDEN_RATION_CONJUGATE));
+ ofs = w * (1.0f - M_GOLDEN_RATIO_CONJUGATE);
}
else {
ofs = h * (h / w);
@@ -472,7 +472,7 @@ static void drawviewborder_triangle(
}
else {
if (golden) {
- ofs = h * (1.0f - (1.0f / M_GOLDEN_RATION_CONJUGATE));
+ ofs = h * (1.0f - M_GOLDEN_RATIO_CONJUGATE);
}
else {
ofs = w * (w / h);
@@ -662,7 +662,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *ar, View
}
if (ca->dtx & CAM_DTX_GOLDEN) {
- drawviewborder_grid3(shdr_pos, x1, x2, y1, y2, 1.0f - (1.0f / M_GOLDEN_RATION_CONJUGATE));
+ drawviewborder_grid3(shdr_pos, x1, x2, y1, y2, 1.0f - M_GOLDEN_RATIO_CONJUGATE);
}
if (ca->dtx & CAM_DTX_GOLDEN_TRI_A) {
More information about the Bf-blender-cvs
mailing list