-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiterate_rotation_bonus.c
52 lines (44 loc) · 1.27 KB
/
iterate_rotation_bonus.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* iterate_rotation_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sanglee2 <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/01 18:56:10 by sanglee2 #+# #+# */
/* Updated: 2023/05/27 23:02:46 by sanglee2 ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap_bonus.h"
void iterate_ra(t_deq* deq_a, int a_loc)
{
while(a_loc > 0)
{
ra(deq_a);
a_loc--;
}
}
void iterate_rra(t_deq* deq_a, int a_loc)
{
while (a_loc < 0)
{
rra(deq_a);
a_loc++;
}
}
void iterate_rb(t_deq* deq_b, int b_loc)
{
while(b_loc > 0)
{
rb(deq_b);
b_loc--;
}
}
void iterate_rrb(t_deq* deq_b, int b_loc)
{
while(b_loc < 0)
{
rrb(deq_b);
b_loc++;
}
}