summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRosyid Haryadi <rosyid_haryadi@protonmail.com>2023-12-23 02:50:40 +0700
committerRosyid Haryadi <rosyid_haryadi@protonmail.com>2023-12-23 02:50:40 +0700
commitf47ce237f6f1d8c1d7c840363ac15c755600d93e (patch)
tree6a4e8d2129ad9afe5a49a2e8418ead71f2d3f4e0 /src
parent4cc0f5953b4a8fd3552cb26393247f4e13c7033b (diff)
fix y mirrored
Diffstat (limited to 'src')
-rw-r--r--src/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 17edaa7..e35e325 100644
--- a/src/main.c
+++ b/src/main.c
@@ -58,10 +58,9 @@ void doDrawing(InitConfig config) {
int end = config.SCREEN_WIDTH / 2;
int start = -1 * end;
for (int x = start; x < end; x++) {
- float y1 = 100 * sinf((float)x/10);
- float y2 = 100 * cosf((float)x/12);
- float y = y1 + y2;
- DrawPixelV(Vector2Add((Vector2){(float)x, y}, (Vector2){(float)config.ORIGIN_X, (float)config.ORIGIN_Y}), WHITE);
+ float y = 100 * sinf((float)x/10);
+ y *= -1;
+ DrawPixelV(Vector2Add((Vector2){(float)x, y}, (Vector2){(float)config.ORIGIN_X, (float)config.ORIGIN_Y}), GREEN);
}
EndDrawing();