Angle Increases as Distance Decreases

I have tried a number of additions, subtractions, divisions and multipliers to try to get this. No problem if they both increased or decreased. The issue is that I have 53 degrees of arc going from 11 to 64 degrees. When at 11 degrees the range is farther away at 34 units distance and when at 64 degrees the distance is closer at 11 units. The ratio across this range is about the same so if the angle is 36.5 or halfway between min and max angles then the distance should be 22.5 at halfway between 11 and 34. I just do not know how to make an elegant equation out of this.

var targetingCrosshairs : GameObject;

function Update () {
    //xAngle can be a value between 11 and 64 degrees
    var xAngle : float = transform.rotation.eulerAngles.x;
    //When xAngle is 11 then distance is 34
    //When xAngle is 64 then distance is 11
    targetingCrosshairs.transform.localPosition.z = ?;
}

Any help from the math whizzes would be regarded with awe at this point:smile: I kept winding up at college math graphing sites no matter how I googled this. I would use a RangeMapper Xpresso node in C4D and be done with it! How do you range map in UnityScript?

TIA
BTH

Are you calculating distance from angle, or angle from distance?
Just in case, I’ll give you both formulas

angle = ((distance - 11) / 23) * 53 + 11

distance = ((angle - 11) / 53) * 23 + 11

Thanks. I almost had it a few dozen times last night. The brackets killed my version by not having the second enclosing set.

Consider yourself regarded with awe…and have a cookie, beer, joint or coffee as needed:)

BTH