Add java lang math methods

This commit is contained in:
Victor Shcherb 2013-01-21 22:43:29 +01:00 committed by Alexey Pelykh
parent 13848cb520
commit 7699c12597
3 changed files with 50 additions and 0 deletions

View File

@ -791,6 +791,44 @@ Java_java_lang_Math_tan(JNIEnv*, jclass, jdouble val)
return tan(val);
}
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_asin(JNIEnv*, jclass, jdouble val)
{
return asin(val);
}
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_acos(JNIEnv*, jclass, jdouble val)
{
return acos(val);
}
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_atan(JNIEnv*, jclass, jdouble val)
{
return atan(val);
}
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_sinh(JNIEnv*, jclass, jdouble val)
{
return sinh(val);
}
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_cosh(JNIEnv*, jclass, jdouble val)
{
return cosh(val);
}
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_tanh(JNIEnv*, jclass, jdouble val)
{
return tanh(val);
}
extern "C" JNIEXPORT jdouble JNICALL
Java_java_lang_Math_sqrt(JNIEnv*, jclass, jdouble val)
{

View File

@ -56,6 +56,12 @@ public class RandomAccessFile {
this.position = position;
}
public int skipBytes(int count) throws IOException {
if (position + count > length()) throw new IOException();
this.position = position + count;
return count;
}
public void readFully(byte[] buffer, int offset, int length)
throws IOException
{

View File

@ -93,6 +93,12 @@ public final class Math {
public static native double tan(double v);
public static native double cosh(double v);
public static native double sinh(double v);
public static native double tanh(double v);
public static native double acos(double v);
public static native double asin(double v);