library Math
	public struct Math
		private static real DELTA = .0001

		static method radiansNormalizeHalf takes real n returns real
			n = radiansNormalizeHalfModulo(n)
			if n > bj_PI then
				return n - 2.*bj_PI
			end
			return n
		end

		static method radiansNormalizeHalfModulo takes real n returns real
			return ModuloReal(n, 2.*bj_PI - DELTA)
		end

		static method minReal takes real a, real b returns real
			return RMinBJ(a, b)
		end

		static method maxReal takes real a, real b returns real
			return RMaxBJ(a, b)
		end
	end
endlibrary
