Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- public struct Vector2D
- {
- public double x;
- public double y;
- public double dot;
- public Vector2D(double vx,double vy)
- {
- x = vx;
- y = vy;
- }
- public Vector2D(Vector2D temp)
- {
- x = temp.x;
- y = temp.y;
- }
- public double lenght
- {
- get
- {
- double SQRT = Math.Sqrt((x*x) + (y*y));
- return SQRT;
- }
- }
- public double angle
- {
- get
- {
- double Angle = Math.Atan2(y,x);
- return Angle;
- }
- }
- public void Dot(Vector2D temp)
- {
- dot = ((x*temp.x) + (y * temp.y));
- }
- static Vector2D FromPolar()
- {
- Vector2D temp(lenght,angle);
- }
- }
- namespace ValueType
- {
- class Program
- {
- static void Main(string[] args)
- {
- }
- }
- }
Add Comment
Please, Sign In to add comment