makeclass('NilIsZero') -- This is intended to be used as a metatable
makeclass('login')

function NilIsZero.__index(t,k)
  return 0
  end

function NilIsZero.__newindex(t,k,v)
  if v~=nil and v~=0 then rawset(t,k,v) end
  end

function seq(a,b,c) return a<=b and b<=c end

function bound(a,b,c)
  if b<a then return b elseif b>c then return c else return b end
  end

function lerp(a,b,c,d,e)
  return d+(e-d)*(a-b)/(c-b)
  end

