From cb80b0448beff2aeb989a8cc16a0050a7affb5db Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sat, 10 Jan 2004 19:17:06 +0000 Subject: [PATCH] use G_SQRT2 instead of the golden ratio (see bug #124073). 2004-01-10 Sven Neumann * app/display/gimpdisplayshell-scale.c (gimp_display_shell_scale_zoom_fraction): use G_SQRT2 instead of the golden ratio (see bug #124073). --- ChangeLog | 6 ++++++ app/display/gimpdisplayshell-scale.c | 10 ++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e38980d36..a077969a68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-01-10 Sven Neumann + + * app/display/gimpdisplayshell-scale.c + (gimp_display_shell_scale_zoom_fraction): use G_SQRT2 instead of + the golden ratio (see bug #124073). + 2004-01-10 Michael Natterer * app/gui/layers-commands.c (layers_alpha_to_selection_cmd_callback): diff --git a/app/display/gimpdisplayshell-scale.c b/app/display/gimpdisplayshell-scale.c index dcc276a7d8..54096b1111 100644 --- a/app/display/gimpdisplayshell-scale.c +++ b/app/display/gimpdisplayshell-scale.c @@ -74,11 +74,6 @@ gimp_display_shell_scale_zoom_fraction (GimpZoomType zoom_type, { gdouble ratio; - /* The golden ratio is (1 + sqrt 5)/2. It has some nice - * properties which make it a good choice for a zoom ratio. - */ -#define GOLDEN_RATIO 1.618033989 - g_return_if_fail (scalesrc != NULL); g_return_if_fail (scaledest != NULL); @@ -87,12 +82,11 @@ gimp_display_shell_scale_zoom_fraction (GimpZoomType zoom_type, switch (zoom_type) { case GIMP_ZOOM_IN: - - ratio *= GOLDEN_RATIO; + ratio *= G_SQRT2; break; case GIMP_ZOOM_OUT: - ratio /= GOLDEN_RATIO; + ratio /= G_SQRT2; break; default: