I have typically used this when evaluating between choosing a particular reference segment on the basis of multiple metrics, e.g. distance, bearing similarity, length overlap.

mm_norm(x)

Arguments

x

Numeric vector

Value

Normalized vector

Examples

mm_norm(c(1,2,3,4,5,6,7,8,9,10))
#> [1] 0.0000000 0.1111111 0.2222222 0.3333333 0.4444444 0.5555556 0.6666667 #> [8] 0.7777778 0.8888889 1.0000000