public static int constructor(IntPtr l) { int result; try { MathCaculate o = new MathCaculate(); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int GetDownIntegerByDiscount_s(IntPtr l) { int result; try { long inputInterger; LuaObject.checkType(l, 1, out inputInterger); int discount; LuaObject.checkType(l, 2, out discount); long downIntegerByDiscount = MathCaculate.GetDownIntegerByDiscount(inputInterger, discount); LuaObject.pushValue(l, true); LuaObject.pushValue(l, downIntegerByDiscount); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int GetUpInterByPeriod_s(IntPtr l) { int result; try { long inputIntger; LuaObject.checkType(l, 1, out inputIntger); int period; LuaObject.checkType(l, 2, out period); long upInterByPeriod = MathCaculate.GetUpInterByPeriod(inputIntger, period); LuaObject.pushValue(l, true); LuaObject.pushValue(l, upInterByPeriod); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }