Here’s a circuit that Joerg from the electronics chat shared with me. The circuit outputs a current and inputs a current for the variables in the Pythagorean equation. Pythagorean theorem solves for the hypotenuse of a triangle. The currents in the circuit are the same way
where C is the hypotenuse in amps I(A) is side a in amps, I(B) is side b in amps
The circuit I made is using PNP Transistors, it can use NPN but the power supply polarity must be reversed. It uses 7 transistors, and most of them they have collector and base tied together. The circles with “A” in it are where you need to measure the current and C is in the center the 200 ohms are current limiting resistors that protect the variable resistors and transistors from drawing too much when set too really low resistance.
The transistor I used was a 2N5401