org.vertexium.cypher.functions.math.HaversinFunction Maven / Gradle / Ivy
package org.vertexium.cypher.functions.math;
import org.vertexium.cypher.VertexiumCypherQueryContext;
public class HaversinFunction extends CypherUnaryMathFunction {
@Override
protected Object invokeDouble(VertexiumCypherQueryContext ctx, double value) {
return (1.0 - Math.cos(value)) / 2.0;
}
}