Remove squares.h, since it doesn't seem to give any speed advantage over sqrtf
This commit is contained in:
parent
156d50d903
commit
2c3a2e2519
File diff suppressed because one or more lines are too long
@ -1,7 +1,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <defines.h>
|
#include <defines.h>
|
||||||
#include <squares.h>
|
|
||||||
#include <powder.h>
|
#include <powder.h>
|
||||||
#include <air.h>
|
#include <air.h>
|
||||||
#include <misc.h>
|
#include <misc.h>
|
||||||
@ -1813,8 +1812,8 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
{
|
{
|
||||||
#ifdef REALISTIC
|
#ifdef REALISTIC
|
||||||
//The magic number controlls diffusion speed
|
//The magic number controlls diffusion speed
|
||||||
parts[i].vx += 0.05*squares[(unsigned int)round(parts[i].temp)]*ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
parts[i].vx += 0.05f*sqrtf(parts[i].temp)*ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
||||||
parts[i].vy += 0.05*squares[(unsigned int)round(parts[i].temp)]*ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
parts[i].vy += 0.05f*sqrtf(parts[i].temp)*ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
||||||
#else
|
#else
|
||||||
parts[i].vx += ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
parts[i].vx += ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
||||||
parts[i].vy += ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
parts[i].vy += ptypes[t].diffusion*(rand()/(0.5f*RAND_MAX)-1.0f);
|
||||||
|
Loading…
Reference in New Issue
Block a user