Just messing around, I'll save anyway. Profiled the multi to linear function being called each time in Update. And moved it to the class constructor but it actually slowed it down. Might be cache related? As it is the difference between computing the value on the fly vs. getting the stored value
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
|
||||
class Node {
|
||||
public:
|
||||
static const int x_bound = 1000;
|
||||
static const int y_bound = 1000;
|
||||
static const int x_bound = 300;
|
||||
static const int y_bound = 300;
|
||||
|
||||
Node(sf::Vector2i position_);
|
||||
~Node();
|
||||
@@ -23,5 +23,7 @@ private:
|
||||
sf::Vector2i position;
|
||||
int curr_state;
|
||||
int next_state;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user