Sack Library Documentation
|
#define SetFractionV(f,w,n,d) ( (d)? \ ((((f).numerator=((int)((n)*(w))) ) \ ,((f).denominator=((int)(d)))),(f)) \ : ((((f).numerator=((int)((w))) ) \ ,((f).denominator=((int)(1)))),(f)) \ )
Fraction f = 3 1/2;
FRACTION f; SetFractionV( f, 3, 1, 2 ); // the resulting fraction will be 7/2
Copyright (c) 2000+. All rights reserved.
|
What do you think about this topic? Send feedback!
|