/* * public static Fix16 operator+= (Fix16 self, Fix16 rhs) { self.value += rhs.value; return self; } * public static Fix16 operator +=(Fix16 self, fix16_t rhs) { self.value += rhs; return self; } * public static Fix16 operator +=(Fix16 self, double rhs) { self.value += LibFixMath.fix16_from_dbl(rhs); return self; } * public static Fix16 operator +=(Fix16 self, float rhs) { self.value += LibFixMath.fix16_from_float(rhs); return self; } * public static Fix16 operator +=(Fix16 self, int16_t rhs) { self.value += LibFixMath.fix16_from_int(rhs); return self; } * public static Fix16 operator -=( Fix16 &rhs) { value -= rhs.value; return *this; } * public static Fix16 operator -=( fix16_t rhs) { value -= rhs; return *this; } * public static Fix16 operator -=( double rhs) { value -= fix16_from_dbl(rhs); return *this; } * public static Fix16 operator -=( float rhs) { value -= fix16_from_float(rhs); return *this; } * public static Fix16 operator -=( int16_t rhs) { value -= fix16_from_int(rhs); return *this; } * * public static Fix16 operator *=( Fix16 &rhs) { value = fix16_mul(value, rhs.value); return *this; } * public static Fix16 operator *=( fix16_t rhs) { value = fix16_mul(value, rhs); return *this; } * public static Fix16 operator *=( double rhs) { value = fix16_mul(value, fix16_from_dbl(rhs)); return *this; } * public static Fix16 operator *=( float rhs) { value = fix16_mul(value, fix16_from_float(rhs)); return *this; } * public static Fix16 operator *=( int16_t rhs) { value *= rhs; return *this; } * * public static Fix16 operator/=( Fix16 &rhs) { value = fix16_div(value, rhs.value); return *this; } * public static Fix16 operator/=( fix16_t rhs) { value = fix16_div(value, rhs); return *this; } * public static Fix16 operator/=( double rhs) { value = fix16_div(value, fix16_from_dbl(rhs)); return *this; } * public static Fix16 operator/=( float rhs) { value = fix16_div(value, fix16_from_float(rhs)); return *this; } * public static Fix16 operator/=( int16_t rhs) { value /= rhs; return *this; } */ public static fix16 operator +(fix16 self, fix16 other) { fix16 ret = self; ret += other; return(ret); }
public fix16 atan2(fix16 inY) { return(new fix16(LibFixMath.fix16_atan2(value, inY.value))); }
public fix16(fix16 inValue) { value = inValue.value; }
fix16 sdiv(float other) { fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, LibFixMath.fix16_from_float(other)); return(ret); }
fix16 sdiv(int16_t other) { fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, LibFixMath.fix16_from_int(other)); return(ret); }
fix16 sdiv(fix16_t other) { fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, other); return(ret); }
fix16 sdiv(double other) { fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, LibFixMath.fix16_from_dbl(other)); return(ret); }
public static fix16 operator /(fix16 self, double other) { fix16 ret = self; ret /= other; return(ret); }
public static fix16 operator /(fix16 self, int16_t other) { fix16 ret = self; ret /= other; return(ret); }
public static fix16 operator *(fix16 self, float other) { fix16 ret = self; ret *= other; return(ret); }
fix16 smul(fix16 other) { fix16 ret = (fix16)LibFixMath.fix16_smul(value, other.value); return(ret); }
fix16 ssub(int16_t other) { fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -LibFixMath.fix16_from_int(other)); return(ret); }
fix16 ssub(float other) { fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -LibFixMath.fix16_from_float(other)); return(ret); }
fix16 ssub(double other) { fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -LibFixMath.fix16_from_dbl(other)); return(ret); }
fix16 ssub(fix16_t other) { fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -other); return(ret); }
public static fix16 operator -(fix16 self, fix16_t other) { fix16 ret = self; ret -= other; return(ret); }