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` - `Exception`
- `clojure.lang.ExceptionInfo` - `clojure.lang.ExceptionInfo`
- `Integer` - `Integer`
- `Math`
- `java.io.File` - `java.io.File`
- `java.nio.Files` - `java.nio.Files`
- `java.util.regex.Pattern` - `java.util.regex.Pattern`

View file

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

View file

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

View file

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

View file

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