Skip to contents

Given a set of forbidden values on the circle, returns the point that is as far as possible from every forbidden value: the midpoint of the largest circular gap between them. This guarantees the returned point is not itself in the forbidden set.

Usage

largest_gap_point_torus(values)

Arguments

values

Numeric vector in \([0,1)\).

Value

A scalar in \([0,1)\) outside values (in the largest gap).

Examples

largest_gap_point_torus(c(0.1, 0.3, 0.35))
#> [1] 0.725