From 75b508032b9da285f30d4ec7f2af4c63075b8611 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 13 Apr 2013 21:55:02 +0200 Subject: added manyloc test suite; --path now relative to project dir if not absolute --- tests/manyloc/keineschweine/lib/math_helpers.nim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/manyloc/keineschweine/lib/math_helpers.nim (limited to 'tests/manyloc/keineschweine/lib/math_helpers.nim') diff --git a/tests/manyloc/keineschweine/lib/math_helpers.nim b/tests/manyloc/keineschweine/lib/math_helpers.nim new file mode 100644 index 000000000..8af56d1ed --- /dev/null +++ b/tests/manyloc/keineschweine/lib/math_helpers.nim @@ -0,0 +1,10 @@ +import strutils, math + +proc degrees*(rad: float): float = + return rad * 180.0 / PI +proc radians*(deg: float): float = + return deg * PI / 180.0 + +## V not math, sue me +proc ff*(f: float, precision = 2): string {.inline.} = + return formatFloat(f, ffDecimal, precision) -- cgit 1.4.1-2-gfad0