i'm trying to use the math.library on Lua (version 5.4) and i tried to use the math.atan2 here:
math.randomseed (os.time())
local Player_x, Player_y = 400,300
local Enemy_x = math.random (0,800)
local Enemy_y = math.random (0,600)
local angle = math.atan2((Enemy_y - Player_y), (Enemy_x - Player_x))
local angle_degree = math.deg (angle)
print (Enemy_x..","..Enemy_y)
print ("The angle from Enemy to the Player: "..angle_degree.." degree.")
But when i tried to put run on my VSCode, it says that it was "discontinued" and deprecated. Any sort of ways to fix this problem or a simple substitute of this situation.