Skip to content

Commit 2329b72

Browse files
committed
added ffi to math.h
1 parent 748fe00 commit 2329b72

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

pixie/math.pxi

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
(ns pixie.math
2+
(require pixie.ffi-infer :as i))
3+
4+
(i/with-config {:library "m"
5+
:cxx-flags ["-lm"]
6+
:includes ["math.h"]}
7+
(i/defcfn acos)
8+
(i/defcfn asin)
9+
(i/defcfn atan)
10+
(i/defcfn atan2)
11+
(i/defcfn cos)
12+
(i/defcfn cosh)
13+
(i/defcfn sin)
14+
(i/defcfn sinh)
15+
(i/defcfn tanh)
16+
(i/defcfn exp)
17+
(i/defcfn ldexp)
18+
(i/defcfn log)
19+
(i/defcfn log10)
20+
;(i/defcfn modf) ;; Needs ffi support
21+
(i/defcfn pow)
22+
(i/defcfn sqrt)
23+
(i/defcfn ceil)
24+
(i/defcfn fabs)
25+
(i/defcfn floor)
26+
(i/defcfn fmod))

0 commit comments

Comments
 (0)