## Revision 0b006599 libavutil/rational.h

View differences:

libavutil/rational.h
51 51
```}
```
52 52

53 53
```/**
```
54
``` * Rational to double conversion
```
54
``` * Rational to double conversion.
```
55 55
``` * @param a rational to convert
```
56 56
``` * @return (double) a
```
57 57
``` */
```
......
71 71
``` */
```
72 72
```int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max);
```
73 73

74
```/**
```
75
``` * Multiplies two rationals.
```
76
``` * @param b first rational.
```
77
``` * @param c second rational.
```
78
``` * @return b*c.
```
79
``` */
```
74 80
```AVRational av_mul_q(AVRational b, AVRational c);
```
81

82
```/**
```
83
``` * Divides two rationals.
```
84
``` * @param b first rational.
```
85
``` * @param c second rational.
```
86
``` * @return b/c.
```
87
``` */
```
75 88
```AVRational av_div_q(AVRational b, AVRational c);
```
89

90
```/**
```
91
``` * Adds two rationals.
```
92
``` * @param b first rational.
```
93
``` * @param c second rational.
```
94
``` * @return b+c.
```
95
``` */
```
76 96
```AVRational av_add_q(AVRational b, AVRational c);
```
97

98
```/**
```
99
``` * Substracts two rationals.
```
100
``` * @param b first rational.
```
101
``` * @param c second rational.
```
102
``` * returns b-c.
```
103
``` */
```
77 104
```AVRational av_sub_q(AVRational b, AVRational c);
```
105

106
```/**
```
107
``` * Converts a double precision floating point number to a rational.
```
108
``` * @param d double to convert
```
109
``` * @param max the maximum allowed numerator and denominator
```
110
``` * @return (AVRational) d.
```
111
``` */
```
78 112
```AVRational av_d2q(double d, int max);
```
79 113

80 114
```#endif // RATIONAL_H
```

Also available in: Unified diff