Probably easiest to modify the SCARA code, since that's already got angular coordinates involved. The forward and inverse kinematics for polar are much simpler than for SCARA.
void forward_kinematics(const_float_t a, const_float_t b) {
cartes.x = scara_offset.x + cos(RADIANS(a)) * b;
cartes.y = scara_offset.y + sin(RADIANS(a)) * b;
}
void inverse_kinematics(const xyz_pos_t &raw) {
const float x = raw.x - scara_offset.x, y = raw.y - scara_offset.y;
delta.set(DEGREES(ATAN2(y, x)), HYPOT2(x, y));
}
The "axis steps per mm" for X will be in steps per degree, and Y in steps per mm.
scara_offset is the location of the rotary axis relative to the bed zero (center or bottom left corner depending on BED_CENTER_AT_0_0). But in your case you may just set it to 0,0 and avoid placing any models close to the origin.