123 inT16 half_pitch = pitch / 2 - 1;
128 else if (half_pitch < 0)
130 lead_flag = 1 << half_pitch;
132 back_balance = cutpts[x - 1 - array_origin].back_balance << 1;
133 back_balance &= lead_flag + lead_flag - 1;
136 fwd_balance = cutpts[x - 1 - array_origin].fwd_balance >> 1;
137 if (projection->
pile_count (x + half_pitch) > zero_count)
138 fwd_balance |= lead_flag;
147 for (index = x - pitch - pitch_error; index <= x - pitch + pitch_error;
149 if (index >= array_origin) {
150 segpt = &cutpts[index - array_origin];
151 dist = x - segpt->xpos;
156 lead_flag = back_balance ^ segpt->fwd_balance;
158 while (lead_flag != 0) {
160 lead_flag &= lead_flag - 1;
164 for (balance_index = 0;
165 index + balance_index < x - balance_index;
168 (projection->
pile_count (index + balance_index) <=
177 r_index = segpt->region_index + 1;
178 total = segpt->mean_sum + dist;
179 balance_count += offset;
181 dist * dist + segpt->sq_sum + balance_count * balance_count;
182 mean = total / r_index;
183 factor = mean - pitch;
185 factor += sq_dist / (r_index) - mean * mean;
192 mid_cuts = segpt->mid_cuts + mid_cut;
193 region_index = r_index;
inT32 pile_count(inT32 value) const
EXTERN double textord_balance_factor
EXTERN bool textord_fast_pitch_test