namespace NURBS
{
    public class Point4D
    {
        public Point4D(double x, double y, double z, double weight)
        {
            this.X = x;
            this.Y = y;
            this.Z = z;
            this.Weight = weight;
        }

        public double X { get; }

        public double Y { get; }

        public double Z { get; }

        public double Weight { get; }

        public NurbsPoint ToNurbsPoint()
        {
            var x = this.X / this.Weight;
            var y = this.Y / this.Weight;
            var z = this.Z / this.Weight;
            return new NurbsPoint(x, y, z, this.Weight);
        }
    }
}
