From kde-devel Wed Apr 26 21:12:32 2006 From: Christoph Bartoschek Date: Wed, 26 Apr 2006 21:12:32 +0000 To: kde-devel Subject: Re: [OFFTOPIC] std::numeric_limits::min() question. Message-Id: <200604262312.32994.bartoschek () gmx ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=114608601205303 Am Mittwoch, 26. April 2006 22:27 schrieb Dmitry Suzdalev: > On Thursday 27 April 2006 00:12, Will Entriken wrote: > > std::numeric_limits::min() return the minimum positive value. > > Hmm... yes? :) > Bahhh, I should read docs more carefully, thanks! :) > > > you could try maxd = -1 if d will be non-negative. that will be pretty > > obvious what is going on. > > Nope, d might be negative - that's why I didn't use -1 for maxd. > So, then another question: > Maybe I'm wrong when I say that > "-std::numeric_limits::max()" is messy-looking? If you need a value that is smaller than all numbers, you could use: maxd = - std::numeric_limits::infinity(); Christoph >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<