Merge raymath and rlgl into main raylib module
This commit is contained in:
parent
171c2e100c
commit
c0d07991d1
15 changed files with 1012 additions and 68 deletions
|
|
@ -10,7 +10,6 @@
|
|||
//! Copyright (c) Nikolas Wipper 2024
|
||||
|
||||
const rl = @import("raylib");
|
||||
const rlm = @import("raymath");
|
||||
|
||||
const screen_width = 800;
|
||||
const screen_height = 450;
|
||||
|
|
@ -133,7 +132,7 @@ pub fn main() anyerror!void {
|
|||
}
|
||||
|
||||
// Bouncing ball logic
|
||||
ball_position = rlm.vector2Add(ball_position, ball_speed);
|
||||
ball_position = ball_position.add(ball_speed);
|
||||
|
||||
if (ball_position.x >= (@as(f32, @floatFromInt(rl.getScreenWidth())) - ball_radius) or ball_position.x <= ball_radius) {
|
||||
ball_speed.x *= -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue