... | ... |
@@ -693,20 +693,4 @@ |
693 | 693 |
} |
694 | 694 |
|
695 |
/// \brief Returns a random real number the range [0, b) |
|
696 |
/// |
|
697 |
/// It returns a random real number from the range [0, b). |
|
698 |
template <typename Number> |
|
699 |
Number real(Number b) { |
|
700 |
return real<Number>() * b; |
|
701 |
} |
|
702 |
|
|
703 |
/// \brief Returns a random real number from the range [a, b) |
|
704 |
/// |
|
705 |
/// It returns a random real number from the range [a, b). |
|
706 |
template <typename Number> |
|
707 |
Number real(Number a, Number b) { |
|
708 |
return real<Number>() * (b - a) + a; |
|
709 |
} |
|
710 |
|
|
711 | 695 |
/// @} |
712 | 696 |
|
... | ... |
@@ -725,7 +709,6 @@ |
725 | 709 |
/// |
726 | 710 |
/// It returns a random real number from the range [0, b). |
727 |
template <typename Number> |
|
728 |
Number operator()(Number b) { |
|
729 |
|
|
711 |
double operator()(double b) { |
|
712 |
return real<double>() * b; |
|
730 | 713 |
} |
731 | 714 |
|
... | ... |
@@ -733,7 +716,6 @@ |
733 | 716 |
/// |
734 | 717 |
/// It returns a random real number from the range [a, b). |
735 |
template <typename Number> |
|
736 |
Number operator()(Number a, Number b) { |
|
737 |
|
|
718 |
double operator()(double a, double b) { |
|
719 |
return real<double>() * (b - a) + a; |
|
738 | 720 |
} |
739 | 721 |
|
0 comments (0 inline)