summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/C/vector-aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Internal/C/vector-aux.c')
-rw-r--r--packages/base/src/Internal/C/vector-aux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/base/src/Internal/C/vector-aux.c b/packages/base/src/Internal/C/vector-aux.c
index c161556..5528a9d 100644
--- a/packages/base/src/Internal/C/vector-aux.c
+++ b/packages/base/src/Internal/C/vector-aux.c
@@ -716,6 +716,7 @@ int mapValF(int code, float* pval, KFVEC(x), FVEC(r)) {
716 } 716 }
717} 717}
718 718
719inline
719int mod (int a, int b) { 720int mod (int a, int b) {
720 int m = a % b; 721 int m = a % b;
721 if (b>0) { 722 if (b>0) {
@@ -741,7 +742,7 @@ int mapValI(int code, int* pval, KIVEC(x), IVEC(r)) {
741 } 742 }
742} 743}
743 744
744 745inline
745int64_t mod_l (int64_t a, int64_t b) { 746int64_t mod_l (int64_t a, int64_t b) {
746 int64_t m = a % b; 747 int64_t m = a % b;
747 if (b>0) { 748 if (b>0) {
@@ -1230,7 +1231,7 @@ int round_vector_i(KDVEC(v),IVEC(r)) {
1230int mod_vector(int m, KIVEC(v), IVEC(r)) { 1231int mod_vector(int m, KIVEC(v), IVEC(r)) {
1231 int k; 1232 int k;
1232 for(k=0; k<vn; k++) { 1233 for(k=0; k<vn; k++) {
1233 rp[k] = vp[k] % m; 1234 rp[k] = mod(vp[k],m);
1234 } 1235 }
1235 OK 1236 OK
1236} 1237}
@@ -1266,7 +1267,7 @@ int round_vector_l(KDVEC(v),LVEC(r)) {
1266int mod_vector_l(int64_t m, KLVEC(v), LVEC(r)) { 1267int mod_vector_l(int64_t m, KLVEC(v), LVEC(r)) {
1267 int k; 1268 int k;
1268 for(k=0; k<vn; k++) { 1269 for(k=0; k<vn; k++) {
1269 rp[k] = vp[k] % m; 1270 rp[k] = mod_l(vp[k],m);
1270 } 1271 }
1271 OK 1272 OK
1272} 1273}