View | Details | Raw Unified | Return to bug 701
Collapse All | Expand All

(-)a/src/simulator/high-precision.cc (-22 lines)
 Lines 38-64    Link Here 
38
      return value;
38
      return value;
39
    }
39
    }
40
}
40
}
41
HighPrecision Max (HighPrecision const &a, HighPrecision const &b)
42
{
43
  if (a.Compare (b) >= 0)
44
    {
45
      return a;
46
    }
47
  else
48
    {
49
      return b;
50
    }
51
}
52
HighPrecision Min (HighPrecision const &a, HighPrecision const &b)
53
{
54
  if (a.Compare (b) <= 0)
55
    {
56
      return a;
57
    }
58
  else
59
    {
60
      return b;
61
    }
62
}
63
41
64
}; /* namespace ns3 */
42
}; /* namespace ns3 */
(-)a/src/simulator/high-precision.h (-2 / +26 lines)
 Lines 32-39    Link Here 
32
namespace ns3 {
32
namespace ns3 {
33
33
34
HighPrecision Abs (HighPrecision const &value);
34
HighPrecision Abs (HighPrecision const &value);
35
HighPrecision Max (HighPrecision const &a, HighPrecision const &b);
35
inline HighPrecision Max (HighPrecision const &a, HighPrecision const &b);
36
HighPrecision Min (HighPrecision const &a, HighPrecision const &b);
36
inline HighPrecision Min (HighPrecision const &a, HighPrecision const &b);
37
38
39
inline HighPrecision Max (HighPrecision const &a, HighPrecision const &b)
40
{
41
  if (a.Compare (b) >= 0)
42
    {
43
      return a;
44
    }
45
  else
46
    {
47
      return b;
48
    }
49
}
50
inline HighPrecision Min (HighPrecision const &a, HighPrecision const &b)
51
{
52
  if (a.Compare (b) <= 0)
53
    {
54
      return a;
55
    }
56
  else
57
    {
58
      return b;
59
    }
60
}
37
61
38
}; /* namespace ns3 */
62
}; /* namespace ns3 */
39
63

Return to bug 701