/// <summary> /// DUAL.Mul : res = a * b /// The geometric product. /// </summary> public static DUAL operator *(DUAL a, DUAL b) { DUAL res = new DUAL(); res[0] = b[0] * a[0]; res[1] = b[1] * a[0] + b[0] * a[1]; return(res); }
/// <summary> /// DUAL.Conjugate : res = a.Conjugate() /// Clifford Conjugation /// </summary> public DUAL Conjugate() { DUAL res = new DUAL(); res[0] = this[0]; res[1] = -this[1]; return(res); }
/// <summary> /// DUAL.Involute : res = a.Involute() /// Main involution /// </summary> public DUAL Involute() { DUAL res = new DUAL(); res[0] = this[0]; res[1] = -this[1]; return(res); }
/// <summary> /// DUAL.Dual : res = !a /// Poincare duality operator. /// </summary> public static DUAL operator !(DUAL a) { DUAL res = new DUAL(); res[0] = a[1]; res[1] = a[0]; return(res); }
/// <summary> /// DUAL.adds : res = a + b /// multivector/scalar addition /// </summary> public static DUAL operator +(DUAL a, float b) { DUAL res = new DUAL(); res[0] = a[0] + b; res[1] = a[1]; return(res); }
/// <summary> /// DUAL.sadd : res = a + b /// scalar/multivector addition /// </summary> public static DUAL operator +(float a, DUAL b) { DUAL res = new DUAL(); res[0] = a + b[0]; res[1] = b[1]; return(res); }
/// <summary> /// DUAL.Sub : res = a - b /// Multivector subtraction /// </summary> public static DUAL operator -(DUAL a, DUAL b) { DUAL res = new DUAL(); res[0] = a[0] - b[0]; res[1] = a[1] - b[1]; return(res); }
/// <summary> /// DUAL.Vee : res = a & b /// The regressive product. (JOIN) /// </summary> public static DUAL operator &(DUAL a, DUAL b) { DUAL res = new DUAL(); res[1] = 1 * (a[1] * b[1]); res[0] = 1 * (a[0] * b[1] + a[1] * b[0]); return(res); }