From 92f97b30daf39362766d445dc26f807229729d21 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 2 May 2001 22:18:00 +0000 Subject: Hop --- lib/scalaires.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/scalaires.c') 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); -- cgit v1.2.3