Made the casting a little less complex.

No need to cast them BOTH to a double, only one is needed.
Only call for an instance of Config once.