duck

duck

Jul 10th, 2009
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1.  
  2.  
  3. public static float GetMax(float[] theArray)
  4. {
  5. float max = 0;
  6. foreach (float v in theArray)
  7. {
  8. if (v > max)
  9. {
  10. max = v;
  11. }
  12. }
  13. }
  14.  
  15. public static float GetMin(float[] theArray)
  16. {
  17. float min = Mathf.Infinity;
  18. foreach (float v in theArray)
  19. {
  20. if (v < min)
  21. {
  22. min = v;
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment