Skip to content

Commit 0e73e0e

Browse files
reviewed ALL non-external files to follow raylib's convention of no spaces around / or * (#5153)
1 parent 507c859 commit 0e73e0e

34 files changed

+122
-122
lines changed

examples/audio/audio_mixed_processor.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ void ProcessAudio(void *buffer, unsigned int frames)
3030

3131
for (unsigned int frame = 0; frame < frames; frame++)
3232
{
33-
float *left = &samples[frame * 2 + 0], *right = &samples[frame * 2 + 1];
33+
float *left = &samples[frame*2 + 0], *right = &samples[frame*2 + 1];
3434

35-
*left = powf(fabsf(*left), exponent) * ( (*left < 0.0f)? -1.0f : 1.0f );
36-
*right = powf(fabsf(*right), exponent) * ( (*right < 0.0f)? -1.0f : 1.0f );
35+
*left = powf(fabsf(*left), exponent)*( (*left < 0.0f)? -1.0f : 1.0f );
36+
*right = powf(fabsf(*right), exponent)*( (*right < 0.0f)? -1.0f : 1.0f );
3737

38-
average += fabsf(*left) / frames; // accumulating average volume
39-
average += fabsf(*right) / frames;
38+
average += fabsf(*left)/frames; // accumulating average volume
39+
average += fabsf(*right)/frames;
4040
}
4141

4242
// Moving history to the left
@@ -99,7 +99,7 @@ int main(void)
9999
DrawRectangle(199, 199, 402, 34, LIGHTGRAY);
100100
for (int i = 0; i < 400; i++)
101101
{
102-
DrawLine(201 + i, 232 - (int)(averageVolume[i] * 32), 201 + i, 232, MAROON);
102+
DrawLine(201 + i, 232 - (int)(averageVolume[i]*32), 201 + i, 232, MAROON);
103103
}
104104
DrawRectangleLines(199, 199, 402, 34, GRAY);
105105

examples/audio/audio_raw_stream.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ int main(void)
115115
float fp = (float)(mousePosition.y);
116116
frequency = 40.0f + (float)(fp);
117117

118-
float pan = (float)(mousePosition.x) / (float)screenWidth;
118+
float pan = (float)(mousePosition.x)/(float)screenWidth;
119119
SetAudioStreamPan(stream, pan);
120120
}
121121

@@ -141,7 +141,7 @@ int main(void)
141141
}
142142

143143
// Scale read cursor's position to minimize transition artifacts
144-
//readCursor = (int)(readCursor * ((float)waveLength / (float)oldWavelength));
144+
//readCursor = (int)(readCursor*((float)waveLength/(float)oldWavelength));
145145
oldFrequency = frequency;
146146
}
147147

examples/audio/audio_stream_effects.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ int main(void)
148148
static void AudioProcessEffectLPF(void *buffer, unsigned int frames)
149149
{
150150
static float low[2] = { 0.0f, 0.0f };
151-
static const float cutoff = 70.0f / 44100.0f; // 70 Hz lowpass filter
152-
const float k = cutoff / (cutoff + 0.1591549431f); // RC filter formula
151+
static const float cutoff = 70.0f/44100.0f; // 70 Hz lowpass filter
152+
const float k = cutoff/(cutoff + 0.1591549431f); // RC filter formula
153153

154154
// Converts the buffer data before using it
155155
float *bufferData = (float *)buffer;
@@ -158,8 +158,8 @@ static void AudioProcessEffectLPF(void *buffer, unsigned int frames)
158158
const float l = bufferData[i];
159159
const float r = bufferData[i + 1];
160160

161-
low[0] += k * (l - low[0]);
162-
low[1] += k * (r - low[1]);
161+
low[0] += k*(l - low[0]);
162+
low[1] += k*(r - low[1]);
163163
bufferData[i] = low[0];
164164
bufferData[i + 1] = low[1];
165165
}

examples/core/core_2d_camera_platformer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void UpdateCameraPlayerBoundsPush(Camera2D *camera, Player *player, EnvItem *env
294294

295295
Vector2 bboxWorldMin = GetScreenToWorld2D((Vector2){ (1 - bbox.x)*0.5f*width, (1 - bbox.y)*0.5f*height }, *camera);
296296
Vector2 bboxWorldMax = GetScreenToWorld2D((Vector2){ (1 + bbox.x)*0.5f*width, (1 + bbox.y)*0.5f*height }, *camera);
297-
camera->offset = (Vector2){ (1 - bbox.x)*0.5f * width, (1 - bbox.y)*0.5f*height };
297+
camera->offset = (Vector2){ (1 - bbox.x)*0.5f*width, (1 - bbox.y)*0.5f*height };
298298

299299
if (player->position.x < bboxWorldMin.x) camera->target.x = player->position.x;
300300
if (player->position.y < bboxWorldMin.y) camera->target.y = player->position.y;

examples/core/core_3d_camera_first_person.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ int main(void)
100100
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
101101
camera.projection = CAMERA_ORTHOGRAPHIC;
102102
camera.fovy = 20.0f; // near plane width in CAMERA_ORTHOGRAPHIC
103-
CameraYaw(&camera, -135 * DEG2RAD, true);
104-
CameraPitch(&camera, -45 * DEG2RAD, true, true, false);
103+
CameraYaw(&camera, -135*DEG2RAD, true);
104+
CameraPitch(&camera, -45*DEG2RAD, true, true, false);
105105
}
106106
else if (camera.projection == CAMERA_ORTHOGRAPHIC)
107107
{

examples/core/core_3d_camera_fps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static void UpdateCameraAngle(Camera *camera)
263263
// Rotate view vector around right axis
264264
float pitchAngle = -lookRotation.y -
265265
lean.y;
266-
pitchAngle = Clamp(pitchAngle, -PI / 2 + 0.0001f, PI / 2 - 0.0001f); // Clamp angle so it doesn't go past straight up or straight down
266+
pitchAngle = Clamp(pitchAngle, -PI/2 + 0.0001f, PI/2 - 0.0001f); // Clamp angle so it doesn't go past straight up or straight down
267267
Vector3 pitch = Vector3RotateByAxisAngle(yaw, right, pitchAngle);
268268

269269
// Head animation

examples/core/core_3d_camera_split_screen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main(void)
4747
cameraPlayer2.position.x = -3.0f;
4848
cameraPlayer2.position.y = 3.0f;
4949

50-
RenderTexture screenPlayer2 = LoadRenderTexture(screenWidth / 2, screenHeight);
50+
RenderTexture screenPlayer2 = LoadRenderTexture(screenWidth/2, screenHeight);
5151

5252
// Build a flipped rectangle the size of the split view to use for drawing later
5353
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };

examples/core/core_3d_picking.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int main(void)
101101

102102
DrawText("Try clicking on the box with your mouse!", 240, 10, 20, DARKGRAY);
103103

104-
if (collision.hit) DrawText("BOX SELECTED", (screenWidth - MeasureText("BOX SELECTED", 30)) / 2, (int)(screenHeight * 0.1f), 30, GREEN);
104+
if (collision.hit) DrawText("BOX SELECTED", (screenWidth - MeasureText("BOX SELECTED", 30))/2, (int)(screenHeight*0.1f), 30, GREEN);
105105

106106
DrawText("Right click mouse to toggle camera controls", 10, 430, 10, GRAY);
107107

examples/core/core_high_dpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int main(void)
9191
int x = (int)(((float)i)/dpiScale.x);
9292
if (odd) DrawRectangle(x, pixelGridTop, (int)cellSizePx, pixelGridBottom - pixelGridTop, CLITERAL(Color){ 0, 121, 241, 100 });
9393

94-
DrawLine(x, pixelGridTop, (int)(((float)i) / dpiScale.x), pixelGridLabelY - 10, GRAY);
94+
DrawLine(x, pixelGridTop, (int)(((float)i)/dpiScale.x), pixelGridLabelY - 10, GRAY);
9595

9696
if ((x - lastTextX) >= minTextSpace)
9797
{

examples/core/core_window_flags.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int main(void)
4646
//SetConfigFlags(FLAG_VSYNC_HINT | FLAG_MSAA_4X_HINT | FLAG_WINDOW_HIGHDPI);
4747
InitWindow(screenWidth, screenHeight, "raylib [core] example - window flags");
4848

49-
Vector2 ballPosition = { GetScreenWidth() / 2.0f, GetScreenHeight() / 2.0f };
49+
Vector2 ballPosition = { GetScreenWidth()/2.0f, GetScreenHeight()/2.0f };
5050
Vector2 ballSpeed = { 5.0f, 4.0f };
5151
float ballRadius = 20;
5252

0 commit comments

Comments
 (0)