start of electromagnetism Tesla would be proud
This commit is contained in:
1 parent
397d818c62
commit
9fcf86cbbf
3 files changed
+3
-9
No files matched your search
@@ -1,9 +0,0 @@
|
|||||||
#include "cphysics.h"
|
|
||||||
#include "objects.h"
|
|
||||||
|
|
||||||
void gravity(universe_t* univ){
|
|
||||||
|
|
||||||
}
|
|
||||||
void magnetism(universe_t* univ){
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "consts.h"
|
#include "consts.h"
|
||||||
#include "mechanics.h"
|
#include "mechanics.h"
|
||||||
|
#include "magnetism.h"
|
||||||
#include <bits/time.h>
|
#include <bits/time.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
@@ -31,6 +32,7 @@ void *physics(void *args) {
|
|||||||
while (true) {
|
while (true) {
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ct);
|
clock_gettime(CLOCK_MONOTONIC, &ct);
|
||||||
mechanics(uni);
|
mechanics(uni);
|
||||||
|
magnetism(uni);
|
||||||
ot = ct;
|
ot = ct;
|
||||||
long long elapsed = timespec_diff_ns(ct, ot);
|
long long elapsed = timespec_diff_ns(ct, ot);
|
||||||
long long remaining = TIMESTEP / simx - elapsed;
|
long long remaining = TIMESTEP / simx - elapsed;
|
||||||
|
|||||||
Reference in new issue
Block a user