Пример #1
0
 public Fixed <T> Multiply(Fixed <T> t2)
 {
     return(new Fixed <T>(fixedPointValue:
                          (int)(_representation * (Int64)t2._representation) / Q32Format <T> .GetScalingFactor()));
 }
Пример #2
0
 public Fixed(int numberToStore)
 {
     _representation = numberToStore * Q32Format <T> .GetScalingFactor();
 }
Пример #3
0
 public double ToDouble()
 {
     return(_representation / (double)(Q32Format <T> .GetScalingFactor()));
 }
Пример #4
0
 public Fixed <T> Divide(Fixed <T> t2)
 {
     return(new Fixed <T>(fixedPointValue:
                          (int)(_representation * (Int64)Q32Format <T> .GetScalingFactor() / t2._representation)));
 }