[fpc-devel] Comment in math unit is a bit ambiguous?
Bart
bartjunk64 at gmail.com
Fri Sep 18 22:50:51 CEST 2020
Hi,
In unit math.pp you can find this comment:
510
<https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/math.pp?view=markup#l510>
{
returns random values with gaussian distribution }
511
<https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/math.pp?view=markup#l511>
function
RandG(mean,stddev : float) : float;
512
<https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/math.pp?view=markup#l512>
function
RandomRange(const aFrom, aTo: Integer): Integer;
513
<https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/math.pp?view=markup#l513>
function
RandomRange(const aFrom, aTo: Int64): Int64;
The grouping of these functions together with the comment suggests (at
least it did to me) that the comment above it applies to all 3 functions.
This is obviously not the case for the RandomRange functions.
I would propose to insert a single empty line between RandG and the
RandomRange function, so it is more clear that the comment is only about
the RandG function.
--
Bart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200918/aadf2c4f/attachment.htm>
More information about the fpc-devel
mailing list