Skip to content

Commit

Permalink
Merge pull request #25749 from JKobrynski/roundToNearestMultipleOfFou…
Browse files Browse the repository at this point in the history
…rToTypescript

[No QA] [TS migration] Migrate roundToNearestMultipleOfFour function to TypeScript
  • Loading branch information
amyevans authored Aug 28, 2023
2 parents dfb7e23 + 316a788 commit 9e8bcba
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 9e8bcba

Please sign in to comment.