On 29/09/14 09:12, Jaehwan Kim wrote: > I didn't know about DBL_EPSILON. > > - if ((int)(base_scale * 10000) == 0) return; > + if (fabs(base_scale) > DBL_EPSILON) return;
Shouldn't this be < DBL_EPSILON? -- Tom. > > How about this change? > (I don't want to increase unnecessary commits..) > > > > 2014년 9월 26일 금요일, Cedric BAIL<[email protected]>님이 작성한 메시지: > >> I think you are trying to compare double together, but that's not the >> way to go. Look at Enlightenment, dblequal if you want, but basically >> the right way is I think : fabs(a DBL_EPSILON; >> >> On Fri, Sep 26, 2014 at 5:11 AM, Jaehwan Kim <[email protected] >> <javascript:;>> wrote: >>> jaehwan pushed a commit to branch master. >>> >>> >> http://git.enlightenment.org/core/elementary.git/commit/?id=dc1382b9d0c32cc64d6de6266244889578eb13bd >>> >>> commit dc1382b9d0c32cc64d6de6266244889578eb13bd >>> Author: Jaehwan Kim <[email protected] <javascript:;>> >>> Date: Fri Sep 26 12:07:34 2014 +0900 >>> >>> scale: fix the floating number comparison. >>> >>> There's no meaning 0.00001 in scale. So in that case, it is ignored. >>> --- >>> src/lib/elm_main.c | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c >>> index 9fabd43..86ea7c7 100644 >>> --- a/src/lib/elm_main.c >>> +++ b/src/lib/elm_main.c >>> @@ -461,14 +461,15 @@ elm_app_locale_dir_get(void) >>> EAPI void >>> elm_app_base_scale_set(double base_scale) >>> { >>> - if (base_scale <= 0.0) return; >>> + if (base_scale < 0.0) return; >>> + if ((int)(base_scale * 10000) == 0) return; >>> app_base_scale = base_scale; >>> } >>> >>> EAPI double >>> elm_app_base_scale_get(void) >>> { >>> - if (app_base_scale) return app_base_scale; >>> + if (app_base_scale > 0.0) return app_base_scale; >>> return 1.0; >>> } >>> >>> >>> -- >>> >>> >>> >> >> >> >> -- >> Cedric BAIL >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> enlightenment-devel mailing list >> [email protected] <javascript:;> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >> > ------------------------------------------------------------------------------ > Slashdot TV. Videos for Nerds. Stuff that Matters. > http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
