private static KecaknoahFunctionResult ClassPow(KecaknoahContext ctx, KecaknoahObject self, KecaknoahObject[] args) { var da = args.ExpectDouble(2, false); var result = Math.Pow(da[0], da[1]); return result.AsKecaknoahFloat().NoResume(); }
private static KecaknoahFunctionResult ClassLimit(KecaknoahContext ctx, KecaknoahObject self, KecaknoahObject[] args) { var da = args.ExpectDouble(3, false); var result = da[0]; if (result < da[1]) result = da[1]; if (result > da[2]) result = da[2]; return result.AsKecaknoahFloat().NoResume(); }