Similarly here I would say

    local_error[3] = {bound(stabilizationDesired.Roll + trimAngles.Roll, settings.RollMax) - attitudeActual.Roll,