-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmathtest.cpp
More file actions
30 lines (22 loc) · 787 Bytes
/
mathtest.cpp
File metadata and controls
30 lines (22 loc) · 787 Bytes
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
#include <iostream>
#include <stdio.h>
#include <cmath>
int main(){
float speed = 2;
float angle = 0;
float vx_ = speed * cosf(angle);
float vy_ = speed * sinf(angle);
std::cout << speed << " | " << angle << " | " << cosf(angle) << " | " << sinf(angle) << " | " << vx_ << " | " << vy_ << std::endl;
printf("Here\n");
for(int i = 0; i < 8; i++){
printf("Here\n");
angle = angle + (M_PI/4);
vx_ = speed * cosf(angle);
vy_ = speed * sinf(angle);
std::cout << speed << " | " << (angle * 180/M_PI) << " | " << angle << " | " << cosf(angle) << " | " << sinf(angle) << " | " << vx_ << " | " << vy_ << std::endl;
}
std::list<int> myList = {1};
for(auto num : myList) {
}
return 0;
}