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.Threading; | |
using System.Collections.Generic; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
private static int answer; | |
private static int iterations = 0; |
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
//Helper fn | |
int pgcdr(int a, int b) | |
{ | |
if (a) return pgcdr(b % a, a); | |
else return b; | |
} | |
//Recursive gcd fn | |
int gcdr(int a, int b) | |
{ |
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; | |
// RasterLineIterator.cs | |
// 3 November 2013 | |
// Author: Brian MacIntosh | |
/// <summary> | |
/// A simple two-dimensional vector. Replace with any 2d vector class. | |
/// </summary> | |
class Vector2 |
NewerOlder