MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / operator -

Method operator -

code/mathematics/fraction.cpp:15–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 return fraction<T>(n * other.d + other.n * d,
14 d * other.d);}
15 fraction<T> operator -(const fraction<T>& other) const {
16 return fraction<T>(n * other.d - other.n * d,
17 d * other.d); }
18 fraction<T> operator *(const fraction<T>& other) const {
19 return fraction<T>(n * other.n, d * other.d); }
20 fraction<T> operator /(const fraction<T>& other) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected