Esempio n. 1
0
 public static StrokeChecksum sum(this Stroke stroke)
 {//Removed memoization because it makes moved strokes still think they are in the same place.
     var checksum = new StrokeChecksum
     {
         checksum = stroke.StylusPoints.Aggregate(0.0, (acc, item) =>
             acc + Math.Round(item.X, POINT_DECIMAL_PLACE_ROUNDING) + Math.Round(item.Y, POINT_DECIMAL_PLACE_ROUNDING))
     };
     return checksum;
 }
Esempio n. 2
0
 public static StrokeChecksum sum(this Stroke stroke)
 {
     var checksum = new StrokeChecksum
     {
         checksum = stroke.StylusPoints.Aggregate(0.0, (acc, item) =>
             acc + Math.Round(item.X, POINT_DECIMAL_PLACE_ROUNDING) + Math.Round(item.Y, POINT_DECIMAL_PLACE_ROUNDING))
     };
     return checksum;
 }
 public void sumTest()
 {
     Stroke stroke = null; // TODO: Initialize to an appropriate value
     StrokeChecksum expected = new StrokeChecksum(); // TODO: Initialize to an appropriate value
     StrokeChecksum actual;
     actual = StrokeExtensions.sum(stroke);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }