Clearly, the metric given by the haversine formula (the great-circle distance) on the sphere is not equivalent to the euclidean one. In general, if you use the latter one, you will get different results from the one produced by oq-engine. If there is a performance reason behind or if you think that this function should make some assumption about the position of hazard/exposure then you should add a proper comment.