Advertisement
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;
- using System.Threading.Tasks;
- namespace GeometryTasks
- {
- public class Vector
- {
- public double X;
- public double Y;
- }
- public static class Geometry
- {
- public static double GetLength(Vector a)
- {
- return Math.Sqrt(a.X * a.X + a.Y * a.Y);
- }
- public static Vector Add( Vector a, Vector b)
- {
- return new Vector { X = a.X + b.X, Y = a.Y + b.Y } ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement