Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* In an effort to maintain that consistency, we'll make sure that any distance we're shifting the components
* are a multiple of 4.
*
* @param {Number} n
* @returns {Number}
* Round number to the nearest multiple of 4
*/
function roundToNearestMultipleOfFour(n) {
function roundToNearestMultipleOfFour(n: number): number {
if (n > 0) {
return Math.ceil(n / 4.0) * 4;
}
Expand Down