Skip to content

Instantly share code, notes, and snippets.

@Pharap
Created July 10, 2018 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pharap/983bcba604e648b02bebedc44d0d0b16 to your computer and use it in GitHub Desktop.
Save Pharap/983bcba604e648b02bebedc44d0d0b16 to your computer and use it in GitHub Desktop.
Generates angles
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