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