Created
July 10, 2018 04:22
-
-
Save Pharap/983bcba604e648b02bebedc44d0d0b16 to your computer and use it in GitHub Desktop.
Generates angles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
namespace AngleGenerator | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
double Tau = Math.PI * 2; | |
int steps = 16; | |
using (var writer = new StreamWriter("Values.txt")) | |
for (int i = 0; i < steps; ++i) | |
{ | |
double d = ((double)i / (double)steps) * Tau; | |
double x = Math.Cos(d); | |
double y = Math.Sin(d); | |
string line = string.Format("Vector2({0:0.0000}, {1:0.0000}),", x, y); | |
writer.WriteLine(line); | |
Console.WriteLine(line); | |
} | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment