Esempio n. 1
0
 public static float PercentOf(this Price curr, Price orig)
 {
     return(orig.RawPrice == 0 ? 0 : curr.RawPrice / orig.RawPrice * 100);
 }
Esempio n. 2
0
 public static Price Add(this Price a, Price b)
 {
     return(new Price(a.RawPrice + b.RawPrice));
 }
Esempio n. 3
0
 public static float PercentChange(this Price curr, Price orig)
 {
     return(orig.RawPrice == 0 ? 0 : (curr.RawPrice - orig.RawPrice) / orig.RawPrice * 100);
 }
Esempio n. 4
0
 public static Price Subtract(this Price a, Price b)
 {
     return(new Price(a.RawPrice - b.RawPrice));
 }