AForge.Point.Round C# (CSharp) Method

Round() public method

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

Usage Example

コード例 #1
0
ファイル: PointTest.cs プロジェクト: RevDevBev/aforge.net
        public void RoundTest( float x, float y, int expectedX, int expectedY )
        {
            Point point = new Point( x, y );
            IntPoint iPoint = new IntPoint( expectedX, expectedY );

            Assert.AreEqual( iPoint, point.Round( ) );
        }
All Usage Examples Of AForge.Point::Round