I was just reading this logic again, and I realized there's a bug: armAngle can end up larger than maxAngle. If armAngle = maxAngle - 0.000000001, and dt is anything > 0, then armAngle will be > maxAngle for a frame. If that makes any sense. Probably want this as

    if (vy > 0) armAngle += (dt / 300) * maxAngle;
    else armAngle -= (dt / 300) * maxAngle;
    armAngle = clamp(armAngle, 0, maxAngle);

(at least, I think that's equivalent logic)