## resistorDividerByRatio(ratio, resistanceMagnitude, tolerance, series)

import electronics.rlc.resistorDividers-1

Calculate a resistor divider with real resistor values with resistors in desired order of magnitude.

import electronics.rlc.resistorDividers-1;
``` resistorDividerByRatio( 2V/5V, // ratio 100kOhm // order of magnitude of the divider ) ```
 ratio The desired division ratio. resistanceMagnitude The desired resistor order of magnitude. tolerance The maximal allowed tolerance of the divider (optional). If not given, 1% will be used. series The resistor series to use (optional). If not given, E24 is used. return value Array of realisable resistor dividers.

The function accepts the desired ratio, desired order magnitude of the divider's resistors, the maximal allowed tolerance, and the resistor series to use. Based on that, it returns a list of all possible resistor combinations resulting in the desired division ration.

The result is a list of structures containing the following values:

• rUpper - The value for the upper resistor in the divider.
• rLower - The value for the lower resistor in the divider.
• ratio - The exact ratio of the divider.
• errorPercent - The error of the divider in percents.
For more details on resistor series, please see electronics.datasets.resistors.series-1.