summary refs log tree commit diff stats
path: root/lib/pure/math.nim
diff options
context:
space:
mode:
authorMichael Fellinger <m.fellinger@gmail.com>2011-01-04 20:57:00 +0900
committerMichael Fellinger <m.fellinger@gmail.com>2011-01-04 20:57:00 +0900
commit9e2973717806ee28d592b57069a68a14c6a8c077 (patch)
tree6a572b082d9009d2e55b49fee4499043b0254c6d /lib/pure/math.nim
parent8ee63f98364259b2d1b6c02d050e0efccecbcf9b (diff)
downloadNim-9e2973717806ee28d592b57069a68a14c6a8c077.tar.gz
add sin proc for math
Diffstat (limited to 'lib/pure/math.nim')
-rwxr-xr-xlib/pure/math.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index 8e3dd4bdb..a55f4495d 100755
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -159,6 +159,7 @@ when not defined(ECMAScript):
     ## same as ``sqrt(x*x + y*y)``.
   
   proc sinh*(x: float): float {.importc: "sinh", header: "<math.h>".}
+  proc sin*(x: float): float {.importc: "sin", header: "<math.h>".}
   proc tan*(x: float): float {.importc: "tan", header: "<math.h>".}
   proc tanh*(x: float): float {.importc: "tanh", header: "<math.h>".}
   proc pow*(x, y: float): float {.importc: "pow", header: "<math.h>".}
@@ -209,6 +210,7 @@ else:
   proc cosh*(x: float): float = return (exp(x)+exp(-x))*0.5
   proc hypot*(x, y: float): float = return sqrt(x*x + y*y)
   proc sinh*(x: float): float = return (exp(x)-exp(-x))*0.5
+  proc sin*(x: float): float {.importc: "Math.sin", nodecl.}
   proc tan*(x: float): float {.importc: "Math.tan", nodecl.}
   proc tanh*(x: float): float =
     var y = exp(2.0*x)