From a9bbaff74f1858a04f847c21d898945d61ae0165 Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Fri, 12 Oct 2007 12:53:56 -0600 Subject: [PATCH] Added Math.ceil() and Math.sin() --- classpath/java-lang.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classpath/java-lang.cpp b/classpath/java-lang.cpp index 7d4a6259ef..64b8472624 100644 --- a/classpath/java-lang.cpp +++ b/classpath/java-lang.cpp @@ -81,6 +81,12 @@ Java_java_lang_System_doMapLibraryName(JNIEnv* e, jclass, jstring name) return r; } +extern "C" JNIEXPORT jdouble JNICALL +Java_java_lang_Math_sin(JNIEnv*, jclass, jdouble val) +{ + return sin(val); +} + extern "C" JNIEXPORT jdouble JNICALL Java_java_lang_Math_sqrt(JNIEnv*, jclass, jdouble val) { @@ -99,6 +105,12 @@ Java_java_lang_Math_floor(JNIEnv*, jclass, jdouble val) return floor(val); } +extern "C" JNIEXPORT jdouble JNICALL +Java_java_lang_Math_ceil(JNIEnv*, jclass, jdouble val) +{ + return ceil(val); +} + extern "C" JNIEXPORT jint JNICALL Java_java_lang_Double_fillBufferWithDouble(JNIEnv* e, jclass, jdouble val, jbyteArray buffer, jint bufferSize) {