Vector vs[];
-vs.push(ihat(center=(0,u)));
-vs.push(jhat(center=(0,u)));
+draw_ijhat((-u, u));
vs.push(Vector(center=(-1u,-4u), phi=90, "Out"));
vs.push(Vector(center=(-1u,-5.5u), phi=-90, "In"));
}
Vector hatVect (string name, pair center=(0,0), real dir=0, real phi=0) {
- string L = replace("$\mathbf{\hat{X}}$", "X", name);
- Vector v = Vector(center=center, mag=5mm, dir=dir, phi=phi, L=L, outline=rgb(0,0,0));
+ string s = replace("$\mathbf{\hat{X}}$", "X", name);
+ Label L = Label(s, position=EndPoint, align=RightSide);
+ Vector v = Vector(
+ center=center, mag=5mm, dir=dir, phi=phi, L=L, outline=rgb(0,0,0));
return v;
}