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