JavaScript tofijo solo si decimal

var formattedNumber = (x * 1.5).toFixed(2).replace(/[.,]00$/, "");
Weary Wildebeest