diff options
author | Pixel <Pixel> | 2001-05-02 22:18:00 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-05-02 22:18:00 +0000 |
commit | 92f97b30daf39362766d445dc26f807229729d21 (patch) | |
tree | 47eee6b4d06ecc5c4b92f0ef2e84769212d6b997 /lib/scalaires.c | |
parent | ecd16166cde1ffa3edfbaa897b049d532e234ab6 (diff) |
Hop
Diffstat (limited to 'lib/scalaires.c')
-rw-r--r-- | lib/scalaires.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/scalaires.c b/lib/scalaires.c index eb7b7c6..ee44304 100644 --- a/lib/scalaires.c +++ b/lib/scalaires.c @@ -28,6 +28,8 @@ static unsigned long long pgcd(unsigned long long a, unsigned long long b) return pgcd(b, a % b); } +/* Les quelques fonctions utiles à tout le monde... Juste pour éviter de taper du code en n exemplaire */ + rationnel rat_constr_zero(void) { /* renvoie 0 */ rationnel temp; @@ -65,6 +67,8 @@ rationnel rat_constr(unsigned long long num, unsigned long long denom) } +/* Cette fonction est là pour faire beau. En fait, aucune routine ne l'utilise. Elle est écrite "au cas où" */ + rationnel rat_constr_from_double(double flt) { /* cree une fraction a partir d un double */ return rat_constr(floor(flt * PRECISION), PRECISION); |