资 源 简 介
Include this header to be able to do fraction calculations.
By simply including the header and specifying the storage type (integer variant)you can create and use a fractional data type. For example, fraction
foo(3,4) would create a fraction name foo with a value of 3/4, and store the fraction using the int data type. Simple to use, fast, and modifiable for your needs, because its all in one header file at your access. Its use is similar to that of the standard C++ library complex data type. It includes all basic mathematical operations as well as comparison operators, and is very flexible. If you would like to see a feature implemented, just ask here, or you can even do it yourself, and if you would like, post the updated source here for others to use and share.