C#

No description

fork
loading
Files
  • main.cs
  • main.exe
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;

class Vector2{
  public double y;
  public double x;
}

class MainClass {
  public static void Main (string[] args) {
    Console.Clear();
    MainClass Calc = new MainClass();
    double aX = .7;
    double aY = -0.7;
    Vector2 usePoint = new Vector2();
    usePoint.x = aX;
    usePoint.y = aY;
    Console.WriteLine("(" + Calc.calcPoint(usePoint.x, usePoint.y).x + ", " + Calc.calcPoint(usePoint.x, usePoint.y).y + ")");
  }
  Vector2 calcPoint(double X, double Y){
    Vector2 givenPoint = new Vector2();
    givenPoint.x = Math.Cos(X);
    givenPoint.y = Math.Sin(Y);
    return givenPoint;
  }
}