This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>AngryJS</title> | |
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<script src="js/Box2dWeb-2.1.a.3.min.js" type="text/javascript" charset="utf-8"></script> | |
<script src="js/game.js" type="text/javascript" charset="utf-8"></script> | |
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"> | |
</head> |
This file contains hidden or 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
// JAVA REFERENCE IMPLEMENTATION OF IMPROVED NOISE - COPYRIGHT 2002 KEN PERLIN. | |
public final class ImprovedNoise { | |
static public double noise(double x, double y, double z) { | |
int X = (int)Math.floor(x) & 255, // FIND UNIT CUBE THAT | |
Y = (int)Math.floor(y) & 255, // CONTAINS POINT. | |
Z = (int)Math.floor(z) & 255; | |
x -= Math.floor(x); // FIND RELATIVE X,Y,Z | |
y -= Math.floor(y); // OF POINT IN CUBE. | |
z -= Math.floor(z); |