Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrempus authored and WebDrake committed Dec 24, 2012
1 parent ba371c0 commit e946aa6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/random.d
Expand Up @@ -1663,17 +1663,17 @@ private auto zigguratInitialize(T)
{
auto zigguratInnerWidth(int i, int nlayers, T totalArea)
{
auto ai = totalArea * (cast(T)(nlayers - (i + 1)) + cast(T)0.5) / (nlayers);
auto ai = totalArea * (cast(T)(nlayers - (i + 1)) + cast(T)0.5) / nlayers;
auto func = (T x) => fint(x) - x * f(x) - ai;

T x0 = 0;
T x1= 1;
while(func(x1) < 0)
x1 += x1;

return findRoot(func, x0, x1);
}

auto zigguratOffsets(T x0, T x1)
{
auto y0 = f(x0), y1 = f(x1);
Expand All @@ -1698,7 +1698,7 @@ private auto zigguratInitialize(T)
T xInterval = x * (totalArea / nlayers) / innerArea;
T dx = xprev - x;
T scaleY = dy / dx;

if(i == 0)
{
layers[i] = L(0, 2, T.nan, T.nan);
Expand Down

0 comments on commit e946aa6

Please sign in to comment.