Add java.lang.Math

This commit is contained in:
Michiel Borkent 2019-12-18 13:46:07 +01:00 committed by GitHub
parent d88c28ff50
commit 316cce2b59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 0 deletions

View file

@ -186,6 +186,7 @@ The following Java classes are available:
- `Exception`
- `clojure.lang.ExceptionInfo`
- `Integer`
- `Math`
- `java.io.File`
- `java.nio.Files`
- `java.util.regex.Pattern`

View file

@ -78,6 +78,11 @@
"allPublicMethods" : true,
"allPublicFields" : true,
"allPublicConstructors" : true
}, {
"name" : "java.lang.Math",
"allPublicMethods" : true,
"allPublicFields" : true,
"allPublicConstructors" : true
}, {
"name" : "java.lang.Process",
"allPublicMethods" : true,

View file

@ -20,6 +20,7 @@
java.lang.Double
java.lang.Exception
java.lang.Integer
java.lang.Math
java.util.concurrent.LinkedBlockingQueue
java.lang.String
java.lang.System

View file

@ -263,6 +263,7 @@ Everything after that is bound to *command-line-args*."))
Exception java.lang.Exception
Integer java.lang.Integer
File java.io.File
Math java.lang.Math
ProcessBuilder java.lang.ProcessBuilder
String java.lang.String
System java.lang.System

View file

@ -295,6 +295,9 @@
(testing "the root binding of sci/*out*"
(is (= "hello" (bb nil "@(future (prn \"hello\"))")))))
(deftest Math-test
(is (== 8.0 (bb nil "(Math/pow 2 3)"))))
;;;; Scratch
(comment