Mercurial Hosting > traffic-intelligence
view python/tests/moving.txt @ 50:7b06d649122b
re-arrangement
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Sat, 25 Sep 2010 11:36:37 -0400 |
parents | 6d11d9e7ad4e |
children | cc192d0450b3 |
line wrap: on
line source
>>> from moving import * >>> Interval().empty() True >>> Interval(0,1).empty() False >>> Interval(0,1).length() 1 >>> Interval(23.2,24.9).length() 1.6999999999999993 >>> Interval(10,8).length() 0 >>> TimeInterval(0,1).length() 2 >>> TimeInterval(10,8).length() 0 >>> Point(3,4)-Point(1,7) (2.000000,-3.000000) >>> Point(3,2).norm2Squared() 13 >>> Point.distanceNorm2(Point(3,4),Point(1,7)) 3.6055512754639891