From 19db075fb5c22e8a454cc9e8b3e07aff9355ef9c Mon Sep 17 00:00:00 2001 From: braxtonhall Date: Wed, 26 Oct 2022 23:25:40 -0700 Subject: Add Alex --- entries/alexanderjsummers/scala/Fib.scala | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 entries/alexanderjsummers/scala/Fib.scala (limited to 'entries') diff --git a/entries/alexanderjsummers/scala/Fib.scala b/entries/alexanderjsummers/scala/Fib.scala new file mode 100644 index 0000000..bc25902 --- /dev/null +++ b/entries/alexanderjsummers/scala/Fib.scala @@ -0,0 +1,7 @@ +object Fib { + private val golden = (1 + Math.sqrt(5)) / 2; + + def next(i:Long) : Long = { + Math.round(i.toDouble * golden) + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2