AForge.DoublePoint.Round C# (CSharp) Méthode

Round() public méthode

Rounds the double precision point.
public Round ( ) : IntPoint
Résultat IntPoint
        public IntPoint Round( )
        {
            return new IntPoint( (int) Math.Round( X ), (int) Math.Round( Y ) );
        }

Usage Example

        public void RoundTest( double x, double y, int expectedX, int expectedY )
        {
            DoublePoint dPoint = new DoublePoint( x, y );
            IntPoint    iPoint = new IntPoint( expectedX, expectedY );

            Assert.AreEqual( iPoint, dPoint.Round( ) );
        }