by maxvisser · 1y ago · 0 comments
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.