nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: intro `Float.lerp` for simple linear interpolation
[nit.git]
/
c_src
/
math_nit.h
diff --git
a/c_src/math_nit.h
b/c_src/math_nit.h
index
9d6f75b
..
e13aac3
100644
(file)
--- a/
c_src/math_nit.h
+++ b/
c_src/math_nit.h
@@
-18,6
+18,10
@@
#include <time.h>
#define kernel_Int_Int_rand_0(self) ((int)(((double)(self))*rand()/(RAND_MAX+1.0)))
#include <time.h>
#define kernel_Int_Int_rand_0(self) ((int)(((double)(self))*rand()/(RAND_MAX+1.0)))
+#define kernel_Int_Int_binand_0(self, p0) (self & p0)
+#define kernel_Int_Int_binor_0(self, p0) (self | p0)
+#define kernel_Int_Int_binxor_0(self, p0) (self ^ p0)
+#define kernel_Int_Int_binnot_0(self) (~self)
#define kernel_Float_Float_sqrt_0(self) sqrt(self)
#define kernel_Float_Float_cos_0(self) cos(self)
#define kernel_Float_Float_sin_0(self) sin(self)
#define kernel_Float_Float_sqrt_0(self) sqrt(self)
#define kernel_Float_Float_cos_0(self) cos(self)
#define kernel_Float_Float_sin_0(self) sin(self)