IntToBinary() private method

private IntToBinary ( int val, int bits ) : string
val int
bits int
return string
Example #1
0
 static public int IntToBinary_s(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         System.Int32 a1;
         checkType(l, 1, out a1);
         System.Int32 a2;
         checkType(l, 2, out a2);
         var ret = NGUIMath.IntToBinary(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #2
0
 static public int IntToBinary_s(IntPtr l)
 {
     try {
         System.Int32 a1;
         checkType(l, 1, out a1);
         System.Int32 a2;
         checkType(l, 2, out a2);
         var ret = NGUIMath.IntToBinary(a1, a2);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #3
0
 static public int IntToBinary_s(IntPtr l)
 {
     try {
         System.Int32 a1;
         checkType(l, 1, out a1);
         System.Int32 a2;
         checkType(l, 2, out a2);
         var ret = NGUIMath.IntToBinary(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #4
0
 public unsafe static long $Invoke22(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(NGUIMath.IntToBinary(*(int *)args, *(int *)(args + 1))));
 }