Beispiel #1
0
        public void ToFloatShouldConvertToFloat()
        {
            var a = new Point <int>(1, 2);
            var b = a.ToFloat();

            Assert.AreEqual((float)a.x, b.x);
            Assert.AreEqual(a.x, (int)b.x);
        }
 public void AddPolygon(Point [] points)
 {
     AddPolygon (points.ToFloat());
 }
 public void AddCurve(Point[] points, int offset, int numberOfSegments, float tension)
 {
     AddCurve (points.ToFloat(), offset, numberOfSegments, tension);
 }
 public void AddCurve(Point [] points, float tension)
 {
     AddCurve (points.ToFloat (), tension);
 }
 public void AddCurve(Point [] points)
 {
     AddCurve (points.ToFloat(), 0.5f);
 }
        public void AddClosedCurve(Point[] points, float tension)
        {
            if (points == null)
                throw new ArgumentNullException ("points");
            if (points.Length < 3)
                throw new ArgumentException ("number of points");

            AddClosedCurve (points.ToFloat (), tension);
        }