Resistance calculator: Difference between revisions

Line 214:
proc `*`(r:Resistor,other:Resistor) : auto = return Resistor(symbol:'*', a:r, b:other)
 
var R0,R1,R2,R3,R4,R5,R6,R7,R8,R9,R10 : Resistor
let resistors = [6,8,4,8,4,6,8,10,6,2].map(res => Resistor(symbol:'r',resistance:res.float))
(R1,R2,R3,R4,R5,R6,R7,R8,R9,R10) = resistors