Unity Distance Function Formula Algebra