Madwand

Stress test code 2.3

Oct 4th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. firstpass = true
  2.  
  3. function Update(I)
  4.   if firstpass then
  5.       CoM = I:GetConstructCenterOfMass()
  6.       math.randomseed(I:GetTime()+CoM.x+CoM.y+CoM.z)
  7.       firstpass = false
  8.   end
  9.  
  10.   for i=1,100,1 do
  11.     local V = Vector3(math.random()*10000,math.random()*10000,math.random()*10000)
  12.     local A1 = math.random()*360
  13.     local A2 = math.random()*360
  14.     local A3 = math.random()*360
  15.     local L1 = Quaternion.Euler(A1,A2,A3)
  16.     --local L8 = L1 * V
  17.     --local L2 = Quaternion.LookRotation(V)
  18.     local L9 = Quaternion.Inverse(L1)
  19.   end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment