diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-11-21 09:56:28 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-11-21 09:56:28 +0100 |
commit | 45e1231149779c363c9abb78cc09e21d047c463f (patch) | |
tree | 111b91a23e747bb2c9df60b0170914cbbd74dec3 /src/misc.c | |
parent | d391e80c7378e6604c8f84538f27df8b915ebd2a (diff) | |
parent | 987942a206ef0f2342bf81d5de6432c6af42b7e7 (diff) |
Update upstream source from tag 'upstream/4.17'
Update to upstream version '4.17'
with Debian dir da192eda54f0b421cbc1b9ba383659593db8d3db
Diffstat (limited to 'src/misc.c')
-rw-r--r-- | src/misc.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -7,6 +7,7 @@ * General Public License as published by the Free Software Foundation; * either version 2.1 or (at your option) any later version. */ +#include <math.h> /* fmod */ #include <stdbool.h> #include <stdio.h> #include <stdlib.h> @@ -88,3 +89,19 @@ EXPORT_SYMBOL void HX_zvecfree(char **args) free(*travp); free(args); } + +EXPORT_SYMBOL float HX_flprf(float x, float y) +{ + float r = fmodf(x, y); + if (r < 0) + r += y; + return r; +} + +EXPORT_SYMBOL double HX_flpr(double x, double y) +{ + double r = fmod(x, y); + if (r < 0) + r += y; + return r; +} |