Skip to content

Instantly share code, notes, and snippets.

@chrisseaton

chrisseaton/Distance.java Secret

Created Apr 24, 2018
Embed
What would you like to do?
...
import org.graalvm.nativeimage.IsolateThread;
import org.graalvm.nativeimage.c.function.CEntryPoint;
public class Distance {
...
@CEntryPoint(name = "distance")
public static double distance(IsolateThread thread,
double a_lat, double a_long,
double b_lat, double b_long) {
return DistanceUtils.getHaversineDistance(a_lat, a_long, b_lat, b_long);
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment