I have a function call like this:
local movementVector = Vec3(-axis.x,0,axis.y)
local camRotation = self.camera:GetRotation(true) *Vec3(0,1,0)
local rotationAngle = tonumber(math.floor(camRotation.y));
local rotatedVector = self:RotateVector(movementVector,rotationAngle)
And a function definition like this:
function Script.RotateVector(unexpectedStuff,vector3,degree)
--For some unknown to the universe reason a table type is being passed here as a first argument
local cosinus = Math:Cos(degree);
local sinus = Math:Sin(degree);
local newX = vector3.x * cosinus - vector3.z * sinus