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); }
/// <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); }
public static double ApplyRate(DeviseChangeRateTuple dcrt, double val) { // A B T : B(T) = A*T return(val * dcrt.DeviseChangeRate); }
public bool EqualsInvertedDevises(DeviseChangeRateTuple dtc) { return(dtc.DeviseSource == this.DeviseCible && dtc.DeviseCible == this.DeviseSource); }