Guest User

Untitled

a guest
Jan 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. float [] aspect
  2. int [] width
  3. float [] diffs
  4.  
  5. float myAspect
  6. int myWidth
  7.  
  8. int n = length(aspect)
  9.  
  10. for i : n
  11. diffs[i] = abs(myWidth - widths[i]) + abs(myAspect - aspect[i])
  12.  
  13. bestIndex = min(diffs)
Add Comment
Please, Sign In to add comment