public static void Main()
for( float angle = 0.0f; angle < 360.0f; angle += 45.0f )
Console.WriteLine(string.Format("{0}° => ({1}|{2})", angle, NozzleX(centerX,size,angle), NozzleY(centerY,size,angle) ));
public static float DegreesToRadians( float degrees )
return (float) (Math.PI * degrees / 180.0);
public static float NozzleX( float center, float size, float angleDeg )
return center - 0.5f * size * (float)Math.Cos( DegreesToRadians(angleDeg)) ;
public static float NozzleY( float center, float size, float angleDeg )
return center + 0.5f * size * (float)Math.Sin( DegreesToRadians(angleDeg)) ;