Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayUtils - minor corrections #1395

Merged
merged 2 commits into from
Dec 2, 2014
Merged

Conversation

pnstickne
Copy link
Contributor

  • Corrected off-by-one issue; the effect/result is the same (except for empty matrices, in which case the update avoids an Exception caused by new Array(-1)) because of the auto-grow array behvaior but it is arguably more correct. (Ref. Not quite right in Utils's transposeArray method #1394)
  • Fixed getRandomItem; it would previously return null for false'y values
    (false/''/0) which was against the defined contract.
  • Updated documentation / documented types

- Corrected off-by-one issue; the effect is the same but it is arguably
  more correct.

- Fixed getRandomItem; it would previously return null for false'y values
  (false/''/0) which was against the defined contract.

- Updated documentation / documented types
- Updated linked documentation

- Also updated `removeRandomItem` per the contract and for consistency with
  `getRandomItem`.
photonstorm added a commit that referenced this pull request Dec 2, 2014
@photonstorm photonstorm merged commit 7795f9c into phaserjs:dev Dec 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants