Some Amazon programmer tomorrow
priceIncrease := (newPrice - oldPrice) / oldPrice var trump_tariff bool
if priceIncrease > 1.0 { trump_tariff = true }
priceIncrease := (newPrice - oldPrice) / oldPrice var trump_tariff bool
if priceIncrease > 1.0 { trump_tariff = true }
const trump_tariff = priceIncrease > 1.0
also saves you from not initializing the variable in the default/other case. :) const
I feel you may underestimate how often they change.