On Tue, Feb 10, 2004 at 10:01:51AM -0600, Dave Rolsky wrote:
> On Mon, 9 Feb 2004, Andrew Pimlott wrote:
> 
> > Although, looking at _normalize_nanoseconds and the tests for it, I
> > don't understand the sense of "normalizing" to (-1, 1) at all.
> 
> I'm not sure what you're referring to.

I don't see why nanoseconds aren't normalized to [0, 1s).  The tests
seem to indicate that this is intentional, but I don't see what good
negative nanoseconds do.  It doesn't seem to make any difference in any
calculation; the only visible effect appears to be in
->delta_nanoseconds.

And by what logic should

    Duration->new(seconds => 1) - Duration->new(nanoseconds => 500000000)

and

    Duration->new(nanoseconds => 500000000)

differ?

Andrew

Reply via email to