Guest User

Untitled

a guest
Jan 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. public struct Vector2D
  6. {
  7.     public double x;
  8.     public double y;
  9.     public double dot;
  10.  
  11.     public Vector2D(double vx,double vy)
  12.     {
  13.         x = vx;
  14.         y = vy;
  15.     }
  16.     public Vector2D(Vector2D temp)
  17.     {
  18.         x = temp.x;
  19.         y = temp.y;
  20.     }
  21.     public double lenght
  22.     {
  23.         get
  24.         {
  25.             double SQRT = Math.Sqrt((x*x) + (y*y));
  26.             return SQRT;
  27.         }
  28.     }
  29.     public double angle
  30.     {
  31.         get
  32.         {
  33.             double Angle = Math.Atan2(y,x);
  34.             return Angle;
  35.         }
  36.     }
  37.     public void Dot(Vector2D temp)
  38.     {
  39.         dot = ((x*temp.x) + (y * temp.y));
  40.     }
  41.     static Vector2D FromPolar()
  42.     {
  43.         Vector2D temp(lenght,angle);
  44.     }
  45. }
  46.  
  47. namespace ValueType
  48. {
  49.     class Program
  50.     {
  51.         static void Main(string[] args)
  52.         {
  53.            
  54.         }
  55.     }
  56. }
Add Comment
Please, Sign In to add comment