Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float [] aspect
- int [] width
- float [] diffs
- float myAspect
- int myWidth
- int n = length(aspect)
- for i : n
- diffs[i] = abs(myWidth - widths[i]) + abs(myAspect - aspect[i])
- bestIndex = min(diffs)
Add Comment
Please, Sign In to add comment