質問編集履歴
2
質問文の間違いを訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
### 発生している問題・エラーメッセージ
|
8
8
|
以下のコードで表示させた図形を特定の角度回転させて新しく色を付けて表示するプログラムを作りたいです。以下のコードは反時計回りのコードなのですがこれを時計回りにしたいです。
|
9
|
-
|
9
|
+
時計回りにするにはコードをどのように変えればいいですか?
|
10
10
|
int posX = 300, posY = 50;
|
11
11
|
int posX3 = 500, posY3 = 100;
|
12
12
|
|
1
ミスがあったので訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,9 +16,10 @@
|
|
16
16
|
float theta2 =1.0f / 4.0f * float(M_PI);
|
17
17
|
float posX4 = posX3 * cosf(theta2) - posX3 * sinf(theta2);
|
18
18
|
float posY4 = posY3 * cosf(theta2) + posY3 * sinf(theta2);
|
19
|
-
|
19
|
+
DrawBox(posX, posY, 100, 100, 0.0f, WHITE, kFillModeSolid);
|
20
|
-
|
20
|
+
DrawBox(posX2, posY2, 100, 100, 0.0f, RED, kFillModeSolid);
|
21
|
-
|
21
|
+
DrawBox(posX3, posY3, 100, 100, 0.0f, WHITE, kFillModeSolid);
|
22
|
+
DrawBox(posX4, posY4, 100, 100, 0.0f, BLUE, kFillModeSolid);
|
22
23
|
```
|
23
24
|
|
24
25
|
```ここに言語名を入力
|