Sorting an array from lowest to highest.
Sorting an array from lowest to highest.
(OP)
I have a array of 4 angles that I need to sort from lowest to highest
example
angl(4)
angl.1 = 1.305
angl.2 = 1.272
angl.3 = 1.342
angl.4 = 1.31
I need to set the array to variables for lowest to highest.
example
1st = angl.2
2nd = angl.1
3rd = angl.4
4th = angl.3
I have been messing aroudn with for loops and things but I cant seem to get it to work.
Is there a sorting method I can use?
Thanks!
example
angl(4)
angl.1 = 1.305
angl.2 = 1.272
angl.3 = 1.342
angl.4 = 1.31
I need to set the array to variables for lowest to highest.
example
1st = angl.2
2nd = angl.1
3rd = angl.4
4th = angl.3
I have been messing aroudn with for loops and things but I cant seem to get it to work.
Is there a sorting method I can use?
Thanks!
RE: Sorting an array from lowest to highest.
TTFN