Skip to content

Instantly share code, notes, and snippets.

@bergpb
Created August 14, 2019 22:12
Show Gist options
  • Select an option

  • Save bergpb/b770e572a41cb1ff889801f88be53c55 to your computer and use it in GitHub Desktop.

Select an option

Save bergpb/b770e572a41cb1ff889801f88be53c55 to your computer and use it in GitHub Desktop.
Transformação Geométrica
#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