Use a descriptive function name

This commit is contained in:
Naveen 2022-10-01 01:13:13 +05:30
parent 8aee6c560b
commit 8142489d87
2 changed files with 4 additions and 4 deletions

View file

@ -3,6 +3,6 @@ package com.simplemobiletools.smsmessenger.extensions
import kotlin.math.roundToInt
/**
* Returns the closest next number divisible by [multipleOf].
* Returns the closest number divisible by [multipleOf].
*/
fun Int.round(multipleOf: Int = 1) = (toDouble() / multipleOf).roundToInt() * multipleOf
fun Int.roundToClosestMultipleOf(multipleOf: Int = 1) = (toDouble() / multipleOf).roundToInt() * multipleOf