Math.floor() is used by SWT. Defers to the libm (or GCC builtin)

for floor
This commit is contained in:
Eric Scharff 2007-10-11 09:59:22 -06:00
parent 1406d6bc24
commit b59d234b16

View File

@ -70,8 +70,15 @@ Java_java_lang_System_doMapLibraryName(JNIEnv* e, jclass, jstring name)
return r;
}
#include <math.h>
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_floor(JNIEnv*, jclass, jdouble val)
{
return floor(val);
}
extern "C" JNIEXPORT jint JNICALL
Java_java_lang_Double_fillBufferWithDouble(JNIEnv *e, jclass, jdouble val,
Java_java_lang_Double_fillBufferWithDouble(JNIEnv* e, jclass, jdouble val,
jbyteArray buffer, jint bufferSize) {
jboolean isCopy;
jbyte* buf = e->GetByteArrayElements(buffer, &isCopy);