aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_extra_keys.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_extra_keys.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ft_extra_keys.c b/src/ft_extra_keys.c
index dba1026..1a81820 100644
--- a/src/ft_extra_keys.c
+++ b/src/ft_extra_keys.c
@@ -28,13 +28,13 @@ int
pl = &clist->plist;
sav_dir_y = pl->dir_y;
- pl->dir_y = pl->dir_y * cos(rot_speed) - pl->dir_x * sin(rot_speed);
- pl->dir_x = sav_dir_y * sin(rot_speed) + pl->dir_x * cos(rot_speed);
+ pl->dir_y = pl->dir_y * cos(-rot_speed) - pl->dir_x * sin(-rot_speed);
+ pl->dir_x = sav_dir_y * sin(-rot_speed) + pl->dir_x * cos(-rot_speed);
sav_plane_x = pl->plane_x;
pl->plane_x = pl->plane_x * cos(rot_speed) - pl->plane_y * sin(rot_speed);
pl->plane_y = sav_plane_x * sin(rot_speed) + pl->plane_y * cos(rot_speed);
- printf("dir_y %f\n", pl->dir_y);
- printf("dir_x %f\n\n", pl->dir_x);
+ printf("dir_y %+f\n", pl->dir_y);
+ printf("dir_x %+f\n\n", pl->dir_x);
return (0);
}
@@ -48,13 +48,13 @@ int
pl = &clist->plist;
sav_dir_y = pl->dir_y;
- pl->dir_y = pl->dir_y * cos(-rot_speed) - pl->dir_x * sin(-rot_speed);
- pl->dir_x = sav_dir_y * sin(-rot_speed) + pl->dir_x * cos(-rot_speed);
+ pl->dir_y = pl->dir_y * cos(rot_speed) - pl->dir_x * sin(rot_speed);
+ pl->dir_x = sav_dir_y * sin(rot_speed) + pl->dir_x * cos(rot_speed);
sav_plane_x = pl->plane_x;
pl->plane_x = pl->plane_x * cos(-rot_speed) - pl->plane_y * sin(-rot_speed);
pl->plane_y = sav_plane_x * sin(-rot_speed) + pl->plane_y * cos(-rot_speed);
- printf("dir_y %f\n", pl->dir_y);
- printf("dir_x %f\n\n", pl->dir_x);
+ printf("dir_y %+f\n", pl->dir_y);
+ printf("dir_x %+f\n\n", pl->dir_x);
return (0);
}