This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.andengine.engine.camera.Camera; | |
import org.andengine.entity.scene.background.ParallaxBackground.ParallaxEntity; | |
import org.andengine.entity.shape.IAreaShape; | |
import org.andengine.opengl.util.GLState; | |
public class FPGParallaxEntity extends ParallaxEntity | |
{ | |
// =========================================================== | |
// Constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: These functions are for a specific seed case of the Fibonacci sequence where fib(0) must equal 1 as | |
// follows: | |
// Fib(0) = 1 | |
// Fib(1) = 1 | |
// Fib(n) = Fib(n-1) + Fib(n-2), where n > 1 | |
// Seed values are F0 = 1, F1 = 1 | |
// So the sequence that should be produced by incrementing n (starting at 0) is as follows: | |
// 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... | |
long long unsigned fibIt(unsigned target) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char* intToStr(int value) | |
{ | |
int divisor = 1; | |
int bufferLength = 1; | |
int isNegative = 0; | |
int bufferIndex = 0; | |
// Handle the negative value case by remebering that the number is negative | |
// and then setting it positive | |
if(value < 0) |