I want to exchange the two data points in a list, like {0.8,0.4}
into {0.4,0.8}
.
So how can make it easier without doing it manually?
All these will take {0.8,0.4}
and transform it into {0.4,0.8}
Reverse[{0.8,0.4}]
(* {0.4,0.8} *)
{0.8,0.4}/.{x_,y_}->{y,x}
(* {0.4,0.8} *)
RotateLeft@{0.8,0.4}
(* {0.4,0.8} *)
RotateRight@{0.8,0.4}
(* {0.4,0.8} *)
Part[{0.8,0.4}, {2,1}]
(* {0.4,0.8} *)
Sort[{0.8,0.4}]
(* {0.4,0.8} *)
Dot[{0.8,0.4},{{0,1},{1,0}}]
(* {0.4,0.8} *)
ReflectionTransform[{1, -1}]@{0.8,0.4}
(* {0.4,0.8} *)
Reverse @ {0.8, 0.4}
$\endgroup$