Skip to content

Commit

Permalink
fix fib
Browse files Browse the repository at this point in the history
  • Loading branch information
Xlinka committed Jun 26, 2024
1 parent c2fd29d commit b85b400
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ProjectObsidian/ProtoFlux/Math/FibonacciNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ protected override int Compute(FrooxEngineContext context)
private int Fibonacci(int n)
{
if (n < 0)
throw new ArgumentException("Negative numbers are not allowed.");
{
UniLog.Log("Negative numbers are not allowed.");
return -1; // Special error value
}
if (n == 0)
return 0;
if (n == 1)
Expand Down

0 comments on commit b85b400

Please sign in to comment.