public MiMFa_Percent SetValue(MiMFa_Percent percent) { None = percent.None; Positive = percent.Positive; Negative = percent.Negative; return(this); }
public MiMFa_Percent(MiMFa_Percent mp) { Positive = mp.Positive; None = mp.None; Negative = mp.Negative; FinalScore = mp.FinalScore; }
public MiMFa_Percent RemoveValue(MiMFa_Percent percent) { None -= percent.None; Positive -= percent.Positive; Negative -= percent.Negative; return(this); }
public static MiMFa_Percent Min(MiMFa_Percent op1, MiMFa_Percent op2) { if (op1 < op2) { return(op1); } return(op2); }
public static MiMFa_Percent Max(MiMFa_Percent op1, MiMFa_Percent op2) { if (op1 > op2) { return(op1); } return(op2); }
public static MiMFa_Percent operator *(MiMFa_Percent op1, decimal op2) { var op = new MiMFa_Percent(0, 0, 0); op.SetValue(op1.Negative * op2); op.SetValue(op1.Positive * op2); op.SetValue(op1.None * op2, true); return(op); }
public static MiMFa_Percent operator /(MiMFa_Percent op1, MiMFa_Percent op2) { var op = new MiMFa_Percent(0, 0, 0); op.SetValue(op1.Negative / op2.Negative); op.SetValue(op1.Positive / op2.Positive); op.SetValue(op1.None / op2.None, true); return(op); }
public static decimal GetValue(MiMFa_Percent th) { switch (th.FinalScore) { case MiMFa_Score.Null: return(th.None); case MiMFa_Score.Positive: return(th.Positive); case MiMFa_Score.Negative: return(th.Negative); case MiMFa_Score.Both: return(th.Positive + th.Negative + th.None); default: return(th.Positive); } }