Created
August 14, 2019 22:12
-
-
Save bergpb/b770e572a41cb1ff889801f88be53c55 to your computer and use it in GitHub Desktop.
Transformação Geométrica
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <math.h> | |
| int main() { | |
| //entre com o valor de teta | |
| //e retorne uma matriz no formato a seguir: | |
| // cos 0 sen 0 | |
| //-sen 0 cos 0 | |
| float teta, sen0, cos0, sen1, cos1; | |
| printf("Entre com o valor de teta: "); | |
| scanf("%f", &teta); | |
| sen0 = sin(teta); | |
| cos0 = cos(teta); | |
| sen1 = (sin(teta)) * -1; | |
| cos1 = cos(teta); | |
| printf("%f %f\n", cos0, sen0); | |
| printf("%f %f", sen1, cos1); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment