Ejemplo n.º 1
0
 private string FindLink(DeviseChangeRateTuple source, DeviseChangeRateTuple cible)
 {
     if (source.DeviseSource == cible.DeviseCible || source.DeviseSource == cible.DeviseSource)
     {
         return(source.DeviseSource);
     }
     if (source.DeviseCible == cible.DeviseCible || source.DeviseCible == cible.DeviseSource)
     {
         return(source.DeviseCible);
     }
     return(null);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Apply an inverted change rate on a value
 /// </summary>
 /// <param name="dcrt">Change rate</param>
 /// <param name="val">Value to conver</param>
 /// <returns>The computed value depending on change rate</returns>
 public static double ApplyInvertRate(DeviseChangeRateTuple dcrt, double val)
 {
     // A B T : A(T) = B*(1/T)
     return(val * 1 / dcrt.DeviseChangeRate);
 }
Ejemplo n.º 3
0
 public static double ApplyRate(DeviseChangeRateTuple dcrt, double val)
 {
     // A B T : B(T) = A*T
     return(val * dcrt.DeviseChangeRate);
 }
Ejemplo n.º 4
0
 public bool EqualsInvertedDevises(DeviseChangeRateTuple dtc)
 {
     return(dtc.DeviseSource == this.DeviseCible && dtc.DeviseCible == this.DeviseSource);
 }