Advertisement
Guest User

StaticPoint

a guest
Sep 21st, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1.  class Point3D
  2.     {
  3.         private double x;
  4.         private double y;
  5.         private double z;
  6.         private static readonly Point3D startingPoint;
  7.  
  8.         static Point3D()
  9.         {
  10.             startingPoint = new Point3D(0, 0, 0);
  11.         }
  12.  
  13.  
  14.         public double X
  15.         {
  16.             get { return this.x; }
  17.             set { this.x = value; }
  18.         }
  19.         public double Y
  20.         {
  21.             get { return y; }
  22.             set { y = value; }
  23.         }
  24.         public double Z
  25.         {
  26.             get { return z; }
  27.             set { z = value; }
  28.         }
  29.  
  30.         public Point3D StartingPoint
  31.         {
  32.             get { return startingPoint; }
  33.         }
  34.        
  35.         public Point3D(double a=0, double b=0, double c=0)
  36.         {
  37.             this.X = a;
  38.             this.Y = b;
  39.             this.Z = c;
  40.         }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement