Tiled 2D Amortized Noise
A Program to Generate Infinite Grayscale Noise Textures with Amortized Noise
 All Classes Files Functions Variables Macros Pages
Common.h
Go to the documentation of this file.
1 
2 
3 
4 
5 
6 
7 // Copyright Ian Parberry, September 2013.
8 //
9 // This file is made available under the GNU All-Permissive License.
10 //
11 // Copying and distribution of this file, with or without modification,
12 // are permitted in any medium without royalty provided the copyright
13 // notice and this notice are preserved. This file is offered as-is,
14 // without any warranty.
15 //
16 // Created by Ian Parberry, September 2013.
17 // Last updated May 7, 2014.
18 
19 #pragma once
20 
21 #define MurmurHash3_32 MurmurHash3_x86_32
22 
23 #define B 0x100
24 #define BM 0xff
25 
26 #define lerp(t, a, b) (a + t*(b - a))
27 #define s_curve(t) (t * t * (3.0f - 2.0f*t))
28 #define s_curve2(t) (t * t * t * (10.0f + 3.0f * t * (2.0f*t - 5.0f)))