export function isDecimal(num: number) {
    return num % 1 !== 0;
  } 

export function toFixedNumber(num: number, decimals: number = 2) {
  // Rounds to 2 decimal places
  if(isDecimal(num)) {
    const multiplier = Math.pow(10, decimals);
    return Math.round(num * multiplier) / multiplier;
  }

  return num;
}
