コード例 #1
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
        /*
         * 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);
        }
コード例 #2
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 public fix16 atan2(fix16 inY)
 {
     return(new fix16(LibFixMath.fix16_atan2(value, inY.value)));
 }
コード例 #3
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 public fix16(fix16 inValue)
 {
     value = inValue.value;
 }
コード例 #4
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 sdiv(float other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, LibFixMath.fix16_from_float(other)); return(ret);
 }
コード例 #5
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 sdiv(int16_t other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, LibFixMath.fix16_from_int(other));   return(ret);
 }
コード例 #6
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 sdiv(fix16_t other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, other);                   return(ret);
 }
コード例 #7
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 sdiv(double other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sdiv(value, LibFixMath.fix16_from_dbl(other));   return(ret);
 }
コード例 #8
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 public static fix16 operator /(fix16 self, double other)
 {
     fix16 ret = self; ret /= other; return(ret);
 }
コード例 #9
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 public static fix16 operator /(fix16 self, int16_t other)
 {
     fix16 ret = self; ret /= other; return(ret);
 }
コード例 #10
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 public static fix16 operator *(fix16 self, float other)
 {
     fix16 ret = self; ret *= other; return(ret);
 }
コード例 #11
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 smul(fix16 other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_smul(value, other.value);             return(ret);
 }
コード例 #12
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 ssub(int16_t other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -LibFixMath.fix16_from_int(other));   return(ret);
 }
コード例 #13
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 ssub(float other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -LibFixMath.fix16_from_float(other)); return(ret);
 }
コード例 #14
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 ssub(double other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -LibFixMath.fix16_from_dbl(other));   return(ret);
 }
コード例 #15
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 fix16 ssub(fix16_t other)
 {
     fix16 ret = (fix16)LibFixMath.fix16_sadd(value, -other);                   return(ret);
 }
コード例 #16
0
ファイル: fix16.hpp.cs プロジェクト: suzuke/libfixmath.net
 public static fix16 operator -(fix16 self, fix16_t other)
 {
     fix16 ret = self; ret -= other; return(ret);
 }