Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _1_Point3D
- {
- class Point3D
- {
- private double x;
- private double y;
- private double z;
- private static readonly Point3D startingPoint;
- static Point3D()
- {
- startingPoint = new Point3D(0, 0, 0);
- }
- public Point3D(double x, double y, double z)
- {
- this.X = x;
- this.Y = y;
- this.Z = z;
- }
- public double X
- {
- get { return this.x; }
- set { this.x = value; }
- }
- public double Y
- {
- get { return this.y; }
- set { this.y = value; }
- }
- public double Z
- {
- get { return this.z; }
- set { this.z = value; }
- }
- public override string ToString()
- {
- return String.Format("{0}, {1}, {2}", this.x, this.y, this.z);
- }
- public static Point3D StartingPoint
- {
- get
- {
- return Point3D.startingPoint;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement