----------------------------------------------------------------------------------------------------------------


local Vector3_new = Vector3.new
local math_max = math.max
local PI = math.pi
local TAU = PI * 2
local tick = tick

local function DeltaAngle(current, target)
	local n = ((target - current) % TAU)
	return (n > PI and (n - TAU) or n)
end

local function DeltaAngleV3(p1, p2)
	return Vector3_new(DeltaAngle(p1.X, p2.X), DeltaAngle(p1.Y, p2.Y), DeltaAngle(p1.Z, p2.Z))
end
