Direction.West => new Point(p.X - amount, p.Y),
 _ => new Point(p.X, p.Y),
 Direction.South => new Point(p.X, p.Y + amount),
 Direction.East => new Point(p.X + amount, p.Y),
 Direction.Right => new Point(p.X + value, p.Y),
 Direction.North => new Point(p.X, p.Y - amount),
 Direction.Down => new Point(p.X, p.Y - value),
Exemple #8
0
 // Operator overloads
 public static Point2i operator +(in Point2i p, in Vector2i v) => new Point2i(p.X + v.X, p.Y + v.Y);
Exemple #9
0
 // Operator overloads
 public static Point3i operator +(in Point3i p, in Vector3i v) => new Point3i(p.X + v.X, p.Y + v.Y, p.Z + v.Z);
 Direction.Up => new Point(p.X, p.Y + value),
Exemple #11
0
 // Operator overloads
 public static Point3f operator +(in Point3f p, in Vector3f v) => new Point3f(p.X + v.X, p.Y + v.Y, p.Z + v.Z);
Exemple #12
0
 return(new Vector3D(p.X, p.Y, p.Z));
Exemple #13
0
 // Operator overloads
 public static Point2f operator +(in Point2f p, in Vector2f v) => new Point2f(p.X + v.X, p.Y + v.Y);
Exemple #14
0
 return(new POINT(p.X, p.Y));
 Direction.Left => new Point(p.X - value, p.Y),
 public static Point GetMousePos() => GetCursorPos(out var p) ? new Point(p.X, p.Y) : Point.Empty;
Exemple #17
0
 return(new Point(p.X, p.Y));