Skip to content

Commit

Permalink
convert roundToNearestMultipleOfFour to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Aug 23, 2023
1 parent 4f412db commit 316a788
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit 316a788

Please sign in to comment.