function escapeTime(startPoint, maxSteps) {
    let stepCount = 0;
    let currentPoint = startPoint;

    while (currentPoint.absSquare() <= ESCAPE_RADIUS_SQUARE && stepCount < maxSteps) {
        currentPoint = currentPoint.square().add(startPoint);
        stepCount += 1;
    }

    return stepCount;
}
/**
 * Runs the escape time algorithm on a complex point.
 * Returns the number of steps needed to reach the escape condition,
 * that is, when the resulting point has magnitude greater than two.
 */
Runs the escape time algorithm on a complex point.
Returns the number of steps needed to reach the escape condition,
that is, when the resulting point has magnitude greater than two.
Runs the escape time algorithm on a complex point . Returns the number of steps needed to reach the escape condition that is when the resulting point has magnitude greater than two .
function escapeTime(startPoint, maxSteps) {
    let stepCount = 0;
    let currentPoint = startPoint;
    while (currentPoint.absSquare() <= ESCAPE_RADIUS_SQUARE && stepCount < maxSteps) {
        currentPoint = currentPoint.square().add(startPoint);
        stepCount += 1;
    }
    return stepCount;
}
function escapeTime ( startPoint , maxSteps ) { let stepCount = 0 ; let currentPoint = startPoint ; while ( currentPoint . absSquare ( ) <= ESCAPE_RADIUS_SQUARE && stepCount < maxSteps ) { currentPoint = currentPoint . square ( ) . add ( startPoint ) ; stepCount += 1 ; } return stepCount ; }
Runs the escape time algorithm on a complex point.
Runs the escape time algorithm on a complex point .