diff options
author | Braxton Hall | 2022-10-27 06:35:47 +0000 |
---|---|---|
committer | GitHub | 2022-10-27 06:35:47 +0000 |
commit | c07b67f3087ed32ef1d75d4a5dd4c53d81a4e8c2 (patch) | |
tree | 478926a85290ce9a6708ae8f3de7f4140aa78493 | |
parent | ed167a009dba7e79f52f1bbe89f8fee80a4d29a2 (diff) | |
parent | 19db075fb5c22e8a454cc9e8b3e07aff9355ef9c (diff) |
Merge pull request #55 from braxtonhall/alex
Alex Summers
-rw-r--r-- | entries/alexanderjsummers/scala/Fib.scala | 7 | ||||
-rw-r--r-- | people.json | 11 |
2 files changed, 18 insertions, 0 deletions
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 diff --git a/people.json b/people.json index 79747a8..e8c43e4 100644 --- a/people.json +++ b/people.json @@ -19,6 +19,17 @@ ] }, { + "github": "alexanderjsummers", + "name": "Alex Summers", + "title": "Associate Professor of Computer Science, UBC", + "entries": [ + { + "name": "golden", + "link": "./entries/alexanderjsummers/scala/Fib.scala" + } + ] + }, + { "github": "braxtonhall", "name": "Braxton Hall", "title": "MSc, UBC", |