using System;
using CrossCutting;

namespace InterpreterLibrary.Models
{
    public class Point
    {
        public Point(int x, int y)
        {
            X = x;
            Y = y;
        }

        public int X { get; }
        public int Y { get; }

        public static implicit operator Point(PointF source)
        {
            return new Point(Convert.ToInt32(source.X), Convert.ToInt32(source.Y));
        }

        public static implicit operator PointF(Point source)
        {
            return new PointF(source.X, source.Y);
        }

        public override string ToString()
        {
            return $"({X}, {Y})";
        }
    }
}
