Lines Matching defs:alpha

65 // alpha = Hab
68 #define SECTORS 16 // number of divisions in alpha and theta
74 cmsFloat64Number alpha;
90 cmsSpherical p; // Keep also alpha & theta of maximum
160 sp ->alpha = sp ->theta = 0;
164 sp ->alpha = _cmsAtan2(a, b);
179 sin_alpha = sin((M_PI * sp ->alpha) / 180.0);
180 cos_alpha = cos((M_PI * sp ->alpha) / 180.0);
197 void QuantizeToSector(const cmsSpherical* sp, int* alpha, int* theta)
199 *alpha = (int) floor(((sp->alpha * (SECTORS)) / 360.0) );
202 if (*alpha >= SECTORS)
203 *alpha = SECTORS-1;
354 int alpha, theta;
367 if (sp ->r < 0 || sp ->alpha < 0 || sp->theta < 0) {
373 QuantizeToSector(sp, &alpha, &theta);
375 if (alpha < 0 || theta < 0 || alpha >= SECTORS || theta >= SECTORS) {
381 return &gbd ->Gamut[theta][alpha];
468 int FindNearSectors(cmsGDB* gbd, int alpha, int theta, cmsGDBPoint* Close[])
477 a = alpha + Spiral[i].AdvX;
502 cmsBool InterpolateMissingSector(cmsGDB* gbd, int alpha, int theta)
515 if (gbd ->Gamut[theta][alpha].Type != GP_EMPTY) return TRUE;
518 nCloseSectors = FindNearSectors(gbd, alpha, theta, Close);
522 sp.alpha = (cmsFloat64Number) ((alpha + 0.5) * 360.0) / (SECTORS);
535 closel.alpha = 0;
560 templ.alpha >= (alpha*360.0/SECTORS) &&
561 templ.alpha <= ((alpha+1)*360.0/SECTORS)) {
568 gbd ->Gamut[theta][alpha].p = closel;
569 gbd ->Gamut[theta][alpha].Type = GP_MODELED;
580 int alpha, theta;
586 for (alpha = 0; alpha < SECTORS; alpha++) {
588 if (!InterpolateMissingSector(gbd, alpha, 0)) return FALSE;
592 for (alpha = 0; alpha < SECTORS; alpha++) {
594 if (!InterpolateMissingSector(gbd, alpha, SECTORS-1)) return FALSE;
600 for (alpha = 0; alpha < SECTORS; alpha++) {
602 if (!InterpolateMissingSector(gbd, alpha, theta)) return FALSE;