Skip to content

Commit dad6b78

Browse files
committed
Documented almost all of Math.Quaternion. Fixed lint error in RandomOutside.
1 parent 20e21ff commit dad6b78

5 files changed

Lines changed: 87 additions & 91 deletions

File tree

src/geom/rectangle/RandomOutside.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,29 @@ var RandomOutside = function (outer, inner, out)
3030
if (ContainsRect(outer, inner))
3131
{
3232
// Pick a random quadrant
33-
//
33+
//
3434
// The quadrants don't extend the full widths / heights of the outer rect to give
3535
// us a better uniformed distribution, otherwise you get clumping in the corners where
3636
// the 4 quads would overlap
3737

3838
switch (Between(0, 3))
3939
{
40-
// Top
41-
case 0:
40+
case 0: // Top
4241
out.x = outer.x + (Math.random() * (inner.right - outer.x));
4342
out.y = outer.y + (Math.random() * (inner.top - outer.y));
4443
break;
4544

46-
// Bottom
47-
case 1:
45+
case 1: // Bottom
4846
out.x = inner.x + (Math.random() * (outer.right - inner.x));
4947
out.y = inner.bottom + (Math.random() * (outer.bottom - inner.bottom));
5048
break;
5149

52-
// Left
53-
case 2:
50+
case 2: // Left
5451
out.x = outer.x + (Math.random() * (inner.x - outer.x));
5552
out.y = inner.y + (Math.random() * (outer.bottom - inner.y));
5653
break;
5754

58-
// Right
59-
case 3:
55+
case 3: // Right
6056
out.x = inner.right + (Math.random() * (outer.right - inner.right));
6157
out.y = outer.y + (Math.random() * (inner.bottom - outer.y));
6258
break;

0 commit comments

Comments
 (0)