Exemple #1
0
 public void addPoportionally(int baseValue, int secondValue, Procent secondProcent)
 {
     if ((baseValue + secondValue) != 0)
     {
         set((this.get() * baseValue + secondProcent.get() * secondValue) / (float)(baseValue + secondValue));
     }
 }
Exemple #2
0
 internal Procent HowMuchHaveOf(Value need)
 {
     if (need.value == 0)
     {
         return(new Procent(1f));
     }
     else
     {
         return(Procent.makeProcent((int)this.value, (int)need.value));
     }
 }
 public Money Multiply(Procent multiplier, bool showMessageAboutNegativeValue = true)
 {
     Multiply(multiplier.get());
     return(this);
 }
Exemple #4
0
 public void AddPoportionally(int totalValculatedValue, int nextElementValue, Procent elementProcent)
 {
     base.AddPoportionally(totalValculatedValue, nextElementValue, elementProcent);
     clamp100();
 }
Exemple #5
0
 protected Procent100(Procent number) : base(number)
 {
     clamp100();
 }
Exemple #6
0
 public Procent(Procent number) : base(number.get())
 {
 }
Exemple #7
0
 public void add(Procent pro, bool showMessageAboutNegativeValue = true)
 {
     base.add(pro, showMessageAboutNegativeValue);
     //if (base.get() > 1f)
     //    set(1f);
 }