mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
normal: finally move to pi/4 rotations #599
This commit is contained in:
parent
dc49bb943b
commit
b119cec29e
@ -73,13 +73,13 @@ rotate_visual(struct notcurses* nc, struct ncplane* n, int dy, int dx){
|
|||||||
n = notcurses_stddim_yx(nc, &dimy, &dimx);
|
n = notcurses_stddim_yx(nc, &dimy, &dimx);
|
||||||
bool failed = false;
|
bool failed = false;
|
||||||
const int ROTATIONS = 32;
|
const int ROTATIONS = 32;
|
||||||
timespec_div(&demodelay, ROTATIONS / 4, &scaled);
|
timespec_div(&demodelay, ROTATIONS / 2, &scaled);
|
||||||
struct ncvisual_options vopts = {
|
struct ncvisual_options vopts = {
|
||||||
};
|
};
|
||||||
ncplane_erase(n);
|
ncplane_erase(n);
|
||||||
for(double i = 0 ; i < ROTATIONS ; ++i){
|
for(double i = 0 ; i < ROTATIONS ; ++i){
|
||||||
demo_nanosleep(nc, &scaled);
|
demo_nanosleep(nc, &scaled);
|
||||||
if(ncvisual_rotate(ncv, -M_PI / 2)){
|
if(ncvisual_rotate(ncv, -M_PI / 4)){
|
||||||
failed = true;
|
failed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user