# Calculation of chord length in RBend wrong

### Summary

When the deflection angle is negative then the chord length that is calculated in RBend is wrong. In a rectangular bend when the orientation of the face relative to the beam (`E1`

) is half of the deflection angle then the chord length should be equal to the length of the dipole. Instead the calculated length is as if `E1`

was multiplied by `-1`

.

### Steps to reproduce

Add `OPTION, LOGBENDTRAJECTORY=TRUE;`

to the input file and track a bunch through a rectangular bend with `ANGLE < 0`

and `E1 = ANGLE / 2`

. Then look up the distance in the file `data/<input_fname>_<bend_name>_traj.dat`

between the two locations where the reference particle crosses `x=0`

.

###
*bug* behavior?

What is the current The current chord length is as if `E1 = -ANGLE / 2`

.

###
*correct* behavior?

What is the expected The chord length should be equal to `L`

in the description of the bend in the input file.