My code:
(* v1 = ripple minimum, v2 = ripple maximum *)
Clear[ripple, v1, v2, dc, rc, t0];
r = Solve[{v1 + (1 - v1) (1 - E^(-dc t0/rc)) == v2 && v2 E^(-(1 - dc) t0/rc) == v1 &&
ripple == v2 - v1}, {v1, v2, ripple}]
which returns

Now I wanted to assign the expression for ripple to a function, and after a couple of failed attempts I came up with this:
ripple[t0_, rc_, dc_] := Evaluate[First[r][[3,2]]]
This works, but I don't know if this is good practice, and I don't want to get bad habits. So, what's the "right" way to do this?