122 inT16 half_pitch = pitch / 2 - 1;
127 else if (half_pitch < 0)
129 lead_flag = 1 << half_pitch;
131 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
132 back_balance &= lead_flag + lead_flag - 1;
135 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
136 if (projection->
pile_count (x + half_pitch) > zero_count)
137 fwd_balance |= lead_flag;
146 for (index = x - pitch - pitch_error; index <= x - pitch + pitch_error;
148 if (index >= array_origin) {
149 segpt = &cutpts[index - array_origin];
150 dist = x - segpt->xpos;
155 lead_flag = back_balance ^ segpt->fwd_balance;
157 while (lead_flag != 0) {
159 lead_flag &= lead_flag - 1;
163 for (balance_index = 0;
164 index + balance_index < x - balance_index;
167 (projection->
pile_count (index + balance_index) <=
176 r_index = segpt->region_index + 1;
177 total = segpt->mean_sum + dist;
178 balance_count += offset;
180 dist * dist + segpt->sq_sum + balance_count * balance_count;
181 mean = total / r_index;
182 factor = mean - pitch;
184 factor += sq_dist / (r_index) - mean * mean;
191 mid_cuts = segpt->mid_cuts + mid_cut;
192 region_index = r_index;
EXTERN bool textord_fast_pitch_test
EXTERN double textord_balance_factor
inT32 pile_count(inT32 value) const