cap.c: new; casting.c: more tests
cap.c: new; rot.c: improved