rem: q = 1.0 - 2.0 * ((phase + 0.75) - (int) (phase + 0.75));
add: q = 1.0 - 2.0 * fmod(phase + 0.75, 1.0);
context: calc_iq(Class* class, Object* object, struct opUpdate* msg) {  struct AHIClassBase* AHIClassBase = (struct AHIClassBase*) class->cl_UserData;  struct AHIClassData* AHIClassData = (struct AHIClassData*) INST_DATA(class, object);  double phase;  double i = 0;  double q = 0;  phase  = fmod(AHIClassData->ticktime * AHIClassData->frequency +		AHIClassData->phase_offset, 1.0);  AHIClassData->phase = phase;  switch  (AHIClassData->waveform) {    case AHIV_LFO_Sine:      i = cos(phase * 2 * M_PI);      q = sin(phase * 2 * M_PI);      break;    case AHIV_LFO_Square: {      static const ULONG sqr[5] = { 1, 1, -1, -1, 1 };	          i = sqr[(int) (phase * 4) + 1];      q = sqr[(int) (phase * 4) + 0];      break;    }	        case AHIV_LFO_Triangle: {      static const ULONG tri[6] = { 0, 1, 0, -1, 0, 1 };	          int i_idx = (int) (phase * 4) + 1;      int q_idx = (int) (phase * 4) + 0;      i = tri[i_idx] + (tri[i_idx + 1] - tri[i_idx]) * phase;      q = tri[q_idx] + (tri[q_idx + 1] - tri[i_idx]) * phase;      break;    }    case AHIV_LFO_Sawtooth:      i = 1.0 - 2.0 * phase;      q = 1.0 - 2.0 * ((phase + 0.75) - (int) (phase + 0.75));      break;  }  AHIClassData->i = AHIClassData->bias + AHIClassData->amplitude * i;  AHIClassData->q = AHIClassData->bias + AHIClassData->amplitude * q;  NotifySuper(class, object, msg,	      AHIA_LFO_Phase, (ULONG) (AHIClassData->phase * FIXED2PI),	      AHIA_LFO_I,     (ULONG) AHIClassData->i,	      AHIA_LFO_Q,     (ULONG) AHIClassData->q,	      TAG_DONE);}