Suggestions.
When exporting code for documentation replace tabs with spaces.
Use a smaller font to help longer lines fit.
As suggested by others put the text in a box or frame.
How you write the original code makes a big differance.
You have some very long lines which makes things worse.
Code:
for(x_left,x_right;(x_left>=548)||(x_right<=826);x_left-=10e-3,x_right+=10e-3){
// Can be written as
for(x_left,x_right;
(x_left>=548)||(x_right<=826);
x_left-=10e-3,x_right+=10e-3){
//
//