Advertisement
3VFF3H_MONS

Timeframe Mod Function Verbose

Jul 13th, 2018
180
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tfrmod(tf_mult,baseres,res_step)=>
  2. resx = baseres * tf_mult
  3. rmndr = -1*(resx % res_step)
  4. divs = (max(rmndr,resx) - min(rmndr,resx))
  5.  
  6. digit_mod4 = pow(10,3)
  7. digit_mod3 = pow(10,2)
  8. digit_mod2 = pow(10,1)
  9. digit_mod1 = 1
  10. remaining_mod4 = (pow(10,4))
  11. remaining_mod3 = (pow(10,3))
  12. remaining_mod2 = (pow(10,2))
  13. remaining_mod1 = (pow(10,1))
  14. rawmod4 = (divs%remaining_mod4)
  15. rawmod3 = (divs%remaining_mod3)
  16. rawmod2 = (divs%remaining_mod2)
  17. rawmod1 = (divs%remaining_mod1)
  18. //
  19. rpv4 = (rawmod4 - (rawmod4%digit_mod4)) / digit_mod4
  20. rpv3 = (rawmod3 - (rawmod3%digit_mod3)) / digit_mod3
  21. rpv2 = (rawmod2 - (rawmod2%digit_mod2)) / digit_mod2
  22. rpv1 = (rawmod1 - (rawmod1%digit_mod1)) / digit_mod1
  23. rpv0 = rpv4*digit_mod4 + rpv3*digit_mod3 + rpv2*digit_mod2 + rpv1*digit_mod1
  24.  
  25. pv = tostring(rpv0, "####")
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement