コード例 #1
0
    public static TssSdtDouble operator ++(TssSdtDouble v)
    {
        TssSdtDouble num = new TssSdtDouble();

        if (v == null)
        {
            num.SetValue(1.0);
            return(num);
        }
        double num2 = v.GetValue() + 1.0;

        num.SetValue(num2);
        return(num);
    }
コード例 #2
0
    public static TssSdtDouble operator --(TssSdtDouble v)
    {
        TssSdtDouble tssSdtDouble = new TssSdtDouble();

        if (v == null)
        {
            tssSdtDouble.SetValue(-1.0);
        }
        else
        {
            double num = v.GetValue();
            num -= 1.0;
            tssSdtDouble.SetValue(num);
        }
        return(tssSdtDouble);
    }
コード例 #3
0
ファイル: TssSdtDouble.cs プロジェクト: TonyDongGuaPi/joework
    public static TssSdtDouble operator --(TssSdtDouble v)
    {
        TssSdtDouble tssSdtDouble = new TssSdtDouble();

        if (object.Equals(v, null))
        {
            double num = 0.0;
            num -= 1.0;
            tssSdtDouble.SetValue(num);
        }
        else
        {
            double num2 = v.GetValue();
            num2 -= 1.0;
            tssSdtDouble.SetValue(num2);
        }
        return(tssSdtDouble);
    }
コード例 #4
0
ファイル: TssSdt.cs プロジェクト: fengqk/Art
 //compile err in Unity3D if we don't override operator--
 public static TssSdtDouble operator--(TssSdtDouble v)
 {
     TssSdtDouble obj = new TssSdtDouble();
     if (v == null)
     {
         obj.SetValue(-1);
     }
     else
     {
         double new_v = v.GetValue();
         new_v -= 1;
         obj.SetValue(new_v);
     }
     return obj;
 }
コード例 #5
0
ファイル: TssSdt.cs プロジェクト: fengqk/Art
 //reserver for custom memory pool imp
 public static TssSdtDouble NewTssSdtDouble()
 {
     TssSdtDouble obj = new TssSdtDouble();
     obj.m_slot = TssSdtDoubleSlot.NewSlot(null);
     return obj;
 }