mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
Add java lang math methods
This commit is contained in:
parent
13848cb520
commit
7699c12597
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user