# HG changeset patch # User michael # Date 1069010619 0 # Node ID c910ff78ef80324d30085717a5f7fa0994f62849 # Parent 46dee16488ae4d751dd663307608741d94f76cac av_d2q() documentation diff -r 46dee16488ae -r c910ff78ef80 rational.c --- a/rational.c Fri Nov 14 05:42:14 2003 +0000 +++ b/rational.c Sun Nov 16 19:23:39 2003 +0000 @@ -51,6 +51,10 @@ return b; } +/** + * Converts a double precission floating point number to a AVRational. + * @param max the maximum allowed numerator and denominator + */ AVRational av_d2q(double d, int max){ AVRational a; int exponent= FFMAX( (int)(log(ABS(d) + 1e-20)/log(2)), 0);