/**
 * This exercise aims to test the psychologist's understanding of the intersection between "Less Than" and
 * "Polar representation of complex numbers". The task is to write a Kotlin function that finds all the complex
 * numbers in polar form which have a magnitude less than a given value and an angle less than a given angle.
 *
 * @param magnitude A positive floating-point number representing the required maximum magnitude of the complex numbers.
 * @param angle A positive floating-point number representing the required maximum angle (in radians) of the complex numbers.
 * @return A list of pairs, where each pair contains two elements (r, theta), representing the polar representation of a
 * complex number which satisfies the given conditions.
 */
fun findComplexNumbersLessThan(magnitude: Double, angle: Double): List<Pair<Double, Double>> {

    val complexNumbers = mutableListOf<Pair<Double, Double>>()
    for (r in 0 until magnitude.toInt()) {
        for (theta in 0 until Math.toDegrees(angle).toInt()) {
            complexNumbers.add(Pair(r.toDouble(), Math.toRadians(theta.toDouble())))
        }
    }
    return complexNumbers
}
/**
 * This exercise aims to test the psychologist's understanding of the intersection between "Less Than" and
 * "Polar representation of complex numbers". The task is to write a Kotlin function that finds all the complex
 * numbers in polar form which have a magnitude less than a given value and an angle less than a given angle.
 *
 * @param magnitude A positive floating-point number representing the required maximum magnitude of the complex numbers.
 * @param angle A positive floating-point number representing the required maximum angle (in radians) of the complex numbers.
 * @return A list of pairs, where each pair contains two elements (r, theta), representing the polar representation of a
 * complex number which satisfies the given conditions.
 */
fun findComplexNumbersLessThan(magnitude: Double, angle: Double): List<Pair<Double, Double>> {
/**
 * This exercise aims to test the psychologist's understanding of the intersection between "Less Than" and
 * "Polar representation of complex numbers". The task is to write a Kotlin function that finds all the complex
 * numbers in polar form which have a magnitude less than a given value and an angle less than a given angle.
 *
 * @param magnitude A positive floating-point number representing the required maximum magnitude of the complex numbers.
 * @param angle A positive floating-point number representing the required maximum angle (in radians) of the complex numbers.
 * @return A list of pairs, where each pair contains two elements (r, theta), representing the polar representation of a
 * complex number which satisfies the given conditions.
 */
fun findComplexNumbersLessThan(magnitude: Double, angle: Double): List<Pair<Double, Double>> {

    val complexNumbers = mutableListOf<Pair<Double, Double>>()
    for (r in 0 until magnitude.toInt()) {
        for (theta in 0 until Math.toDegrees(angle).toInt()) {
            complexNumbers.add(Pair(r.toDouble(), Math.toRadians(theta.toDouble())))
        }
    }
    return complexNumbers
}