Search:

Type: Posts; User: helloworld922

Search: Search took 0.10 seconds.

  1. Replies
    5
    Views
    6,278

    Re: Fibonacci Spiral Help?

    public static int fib(int n)
    {
    if (n < 3)
    {
    return 1;
    }
    int num1 = 1, num2 = 1;
    for (int i = 3; i < n; i++)
    {
    int temp = num1 + num2;
  2. Replies
    5
    Views
    6,278

    Re: Fibonacci Spiral Help?

    Calculating Fibonacci can be fast... O(n) with O(1) memory space :)

    It might be easier to work with the corners rather than the centers because they are always aligned by at least one axis (either...
Results 1 to 2 of 2