shithub: qk1

Download patch

ref: 916d1c746cd6dfac5faeb0865345a0bc07be472e
parent: 70ad28fbebef4f98ddb2ca5ff2ebb839430bd347
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Nov 1 18:34:46 EDT 2023

R_InitTurb: use M_PI

--- a/r_main.c
+++ b/r_main.c
@@ -765,12 +765,11 @@
 */
 void R_InitTurb (void)
 {
-	int		i;
+	int i;
 	
-	for (i=0 ; i<(SIN_BUFFER_SIZE) ; i++)
-	{
-		sintable[i] = AMP + sin(i*3.14159*2/CYCLE)*AMP;
-		intsintable[i] = AMP2 + sin(i*3.14159*2/CYCLE)*AMP2;	// AMP2, not 20
+	for(i = 0; i < SIN_BUFFER_SIZE; i++){
+		sintable[i] = AMP + sin(i*M_PI*2/CYCLE)*AMP;
+		intsintable[i] = AMP2 + sin(i*M_PI*2/CYCLE)*AMP2;	// AMP2, not 20
 	}
 }