Localization of a point for any numerical representation.
Represents a point identified by a midpoint value and a radius value. Generally, time is represented in seconds, as a float value ; frames are represented by integers like ranks.
In this class, the 3 relations <, = and > take into account a radius value, that represents the uncertainty of the localization. For a point x, with a radius value of rx, and a point y with a radius value of ry, these relations are defined as:
- x = y iff |x - y| <= rx + ry
- x < y iff not(x = y) and x < y
- x > y iff not(x = y) and x > y
Example
> 1: Strictly equals:
- x = 1.000, rx=0.
- y = 1.000, ry=0.
x = y is true
x = 1.00000000000, rx=0.
- y = 0.99999999675, ry=0.
- x = y is false
Example
> 2: Using the radius:
- x = 1.0000000000, rx=0.0005
- y = 1.0000987653, ry=0.0005
x = y is true (accepts a margin of 1ms between x and y)
x = 1.0000000, rx=0.0005
- y = 1.0011235, ry=0.0005
- x = y is false
So... an overlap of the vagueness "area" makes the two points equals: |------------rx----------X-----ry===rx----Y--------ry------|