summary refs log tree commit diff stats
path: root/tests/manyloc/keineschweine/lib/math_helpers.nim
blob: 8af56d1ed195759bb2cfcc39ca46e28a9d1a1654 (plain) (blame)
1
2
3
4
5
6
7
8
9
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)