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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-02-27 12:52:34 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-02-27 12:54:38 +0300
commit830a45a18a71ac50ca23b58d2524ce8ec3d102fe (patch)
treeefe17fa2192d94f10008c765b2c32e49766ba820 /source/blender/editors/space_view3d
parent10162d68e38514aa8741cf9efd9e0f5deac32085 (diff)
Improve usage of recent golden ratio define
- fix typo - set back to conjugate value and use as such Followup to rB95175c3b5e2b.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c8
1 files changed, 4 insertions, 4 deletions
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) {