Untitled

Run Settings
LanguageNim
Language Version
Run Command
type CoefModifier* = tuple[plus: float, multiplier: float] MakeDecision = object name: string calc: proc(base:float, modifier: CoefModifier): float proc calc_chance(base:float, modifier: CoefModifier): float = var off_chance = 1 - base # chance to fail off_chance /= modifier.multiplier off_chance /= (1+modifier.plus) return 1 - off_chance var a = MakeDecision(name: "GoodDecision", calc:calc_chance) echo $a.name
Editor Settings
Theme
Key bindings
Full width
Lines