1 -- Copyright (c) 2012, 2014. The SimGrid Team.
2 -- All rights reserved.
4 -- This program is free software; you can redistribute it and/or modify it
5 -- under the terms of the license (GNU LGPL) which comes with this package.
10 local x = a / 2 + b / 2
11 if x ~= math.floor (x) then
14 a = math.floor (a / 2)
15 b = math.floor (b / 2)
20 function index_of(table, o)
21 for i,v in pairs(table) do
28 function is_integer(x)
29 return math.floor(x)==x