mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
REVIEWED: Examples comments, consistent code sections
This commit is contained in:
@ -19,9 +19,6 @@
|
||||
|
||||
#include <math.h> // Required for: sin(), cos(), PI
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Macro Helpers
|
||||
//----------------------------------------------------------------------------------
|
||||
// Constant for Simulation
|
||||
#define SIMULATION_STEPS 30
|
||||
#define G 9.81
|
||||
@ -156,13 +153,16 @@ int main(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Calculate Pendulum End Point
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
// Calculate pendulum end point
|
||||
static Vector2 CalculatePendulumEndPoint(float l, float theta)
|
||||
{
|
||||
return (Vector2){ 10*l*sin(theta), 10*l*cos(theta) };
|
||||
}
|
||||
|
||||
// Calculate Double Pendulum End Point
|
||||
// Calculate double pendulum end point
|
||||
static Vector2 CalculateDoublePendulumEndPoint(float l1, float theta1, float l2, float theta2)
|
||||
{
|
||||
Vector2 endpoint1 = CalculatePendulumEndPoint(l1, theta1);
|
||||
|
||||
Reference in New Issue
Block a user