using System;
using System.Drawing;
using System.Windows.Forms;
class PaintHello
{
public static void Main()
{
PointF pt1 = new PointF(30.6f, 30.8f);
PointF pt2 = new PointF(50.3f, 60.7f);
PointF pt3 = new PointF(110.3f, 80.5f);
Point pt4 = Point.Ceiling(pt1);
Point pt5 = Point.Round(pt2);
Point pt6 = Point.Truncate(pt3);
MessageBox.Show("Value of pt4: " +pt4.ToString());
MessageBox.Show("Value of pt5: " +pt5.ToString());
MessageBox.Show("Value of pt6: " +pt6.ToString());
}
}
|