renatobianchini / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

Round DoublePoint to IntPoint, rather than truncating. #149

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, DoublePoint.operator IntPoint() will truncate (175.9, 125.2) to 
(175, 125). For my purposes, it would be much more useful if it would instead 
round, and return (176, 125).

Was there a reason that truncation was chosen instead of rounding, or can that 
be changed?

Original issue reported on code.google.com by dales...@gmail.com on 31 Aug 2010 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by andrew.k...@gmail.com on 31 Aug 2010 at 8:52

GoogleCodeExporter commented 8 years ago
Added DoublePoint.Round() method to round point to IntPoint using Math.Round().

Committed in revision 1318. Will be released in 2.1.4.

Original comment by andrew.k...@gmail.com on 31 Aug 2010 at 9:12

GoogleCodeExporter commented 8 years ago

Original comment by andrew.k...@gmail.com on 1 Sep 2010 at 7:02