Check if number is within a range

I have a total amount and then I have an amount that a user can insert.

I want to check whether the amount that the user insert is with 2 decimal places of the total amount.

eg. Total amount is 58.79 and the user inserts 58.78 or 58.80, if this is the case then I want to console out “Allowed” else if not the case then “Not allowed”.

another eg. Total amount is 60 and the user inserts 59.99 or 60.01, if this is the case then I want to console out “Allowed” else if not the case then “Not allowed”.

How can I go about this?

My attempt

  const Range = totalAmount - userInsertedAmount;
  if ( (Range < 0.2) || (Range > 0.2)) {
    console.log('valid');
  } else {
    console.log('invalid');
  }

One last thing, is there a way to do it without using any built in Javascript methods like abs etc.