@@ -5062,8 +5062,8 @@ uint16_t mode_2DDrift() { // By: Stepko https://editor.soulmateli
50625062 unsigned long t_20 = t/20 ; // softhack007: pre-calculating this gives about 10% speedup
50635063 for (float i = 1 ; i < maxDim; i += 0.25 ) {
50645064 float angle = radians (t * (maxDim - i));
5065- uint16_t myX = (cols>>1 ) + (uint16_t )(sin_t (angle) * i) + (cols%2 );
5066- uint16_t myY = (rows>>1 ) + (uint16_t )(cos_t (angle) * i) + (rows%2 );
5065+ uint16_t myX = (cols>>1 ) + (uint16_t )(sinf (angle) * i) + (cols%2 );
5066+ uint16_t myY = (rows>>1 ) + (uint16_t )(cosf (angle) * i) + (rows%2 );
50675067 SEGMENT.setPixelColorXY (myX, myY, ColorFromPalette (SEGPALETTE, (i * 20 ) + t_20, 255 , LINEARBLEND));
50685068 }
50695069 SEGMENT.blur (SEGMENT.intensity >>3 );
@@ -5338,8 +5338,8 @@ uint16_t mode_2DJulia(void) { // An animated Julia set
53385338 reAl = -0 .94299f ; // PixelBlaze example
53395339 imAg = 0 .3162f ;
53405340
5341- reAl += sin_t ((float )strip.now /305 .f )/20 .f ;
5342- imAg += sin_t ((float )strip.now /405 .f )/20 .f ;
5341+ reAl += sinf ((float )strip.now /305 .f )/20 .f ;
5342+ imAg += sinf ((float )strip.now /405 .f )/20 .f ;
53435343
53445344 dx = (xmax - xmin) / (cols); // Scale the delta x and y values to our matrix size.
53455345 dy = (ymax - ymin) / (rows);
@@ -6067,8 +6067,8 @@ uint16_t mode_2Dghostrider(void) {
60676067 CRGB color = CRGB::White;
60686068 SEGMENT.wu_pixel (lighter->gPosX * 256 / 10 , lighter->gPosY * 256 / 10 , color);
60696069
6070- lighter->gPosX += lighter->Vspeed * sin_t (radians (lighter->gAngle ));
6071- lighter->gPosY += lighter->Vspeed * cos_t (radians (lighter->gAngle ));
6070+ lighter->gPosX += lighter->Vspeed * sinf (radians (lighter->gAngle ));
6071+ lighter->gPosY += lighter->Vspeed * cosf (radians (lighter->gAngle ));
60726072 lighter->gAngle += lighter->angleSpeed ;
60736073 if (lighter->gPosX < 0 ) lighter->gPosX = (cols - 1 ) * 10 ;
60746074 if (lighter->gPosX > (cols - 1 ) * 10 ) lighter->gPosX = 0 ;
@@ -6090,8 +6090,8 @@ uint16_t mode_2Dghostrider(void) {
60906090 lighter->time [i] = 0 ;
60916091 lighter->reg [i] = false ;
60926092 } else {
6093- lighter->lightersPosX [i] += -7 * sin_t (radians (lighter->Angle [i]));
6094- lighter->lightersPosY [i] += -7 * cos_t (radians (lighter->Angle [i]));
6093+ lighter->lightersPosX [i] += -7 * sinf (radians (lighter->Angle [i]));
6094+ lighter->lightersPosY [i] += -7 * cosf (radians (lighter->Angle [i]));
60956095 }
60966096 SEGMENT.wu_pixel (lighter->lightersPosX [i] * 256 / 10 , lighter->lightersPosY [i] * 256 / 10 , ColorFromPalette (SEGPALETTE, (256 - lighter->time [i])));
60976097 }
@@ -6303,8 +6303,8 @@ uint16_t mode_2Ddriftrose(void) {
63036303
63046304 SEGMENT.fadeToBlackBy (32 +(SEGMENT.speed >>3 ));
63056305 for (size_t i = 1 ; i < 37 ; i++) {
6306- uint32_t x = (CX + (sin_t (radians (i * 10 )) * (beatsin8 (i, 0 , L*2 )-L))) * 255 .f ;
6307- uint32_t y = (CY + (cos_t (radians (i * 10 )) * (beatsin8 (i, 0 , L*2 )-L))) * 255 .f ;
6306+ uint32_t x = (CX + (sinf (radians (i * 10 )) * (beatsin8 (i, 0 , L*2 )-L))) * 255 .f ;
6307+ uint32_t y = (CY + (cosf (radians (i * 10 )) * (beatsin8 (i, 0 , L*2 )-L))) * 255 .f ;
63086308 SEGMENT.wu_pixel (x, y, CHSV (i * 10 , 255 , 255 ));
63096309 }
63106310 SEGMENT.blur ((SEGMENT.intensity >>4 )+1 );
0 commit comments