Changeset 13045 for branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/Structs/PointD.cs
- Timestamp:
- 10/21/15 14:18:31 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/Structs/PointD.cs
r12535 r13045 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Text;25 23 using System.Drawing; 26 24 … … 86 84 } 87 85 public static bool operator !=(PointD point1, PointD point2) { 88 return (point1.X != point2.X) && (point1.Y != point2.Y); 86 return !(point1 == point2); 87 } 88 public static explicit operator Point(PointD point) { 89 return new Point((int)Math.Round(point.X), (int)Math.Round(point.Y)); 90 } 91 public static explicit operator PointF(PointD point) { 92 float fx = (float)point.X; 93 float fy = (float)point.Y; 94 return new PointF(float.IsPositiveInfinity(fx) ? float.MaxValue : fx, float.IsNegativeInfinity(fy) ? float.MinValue : fy); 89 95 } 90 96 public static explicit operator SizeD(PointD point) {
Note: See TracChangeset
for help on using the changeset viewer.