Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

lua wrap number

local function wrap(x_max, x_min, x)
  return (((x - x_min) % (x_max - x_min)) + (x_max - x_min)) % (x_max - x_min) + x_min;
end
 
PREVIOUS NEXT
Tagged: #lua #wrap #number
ADD COMMENT
Topic
Name
9+5 =