summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/code.google.com/p/draw2d/draw2d/raster/fixed_point.go
blob: 14b8419c316c2d103d0ad359b25ab08252025f18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package raster

type Fix int32

const (
	FIXED_SHIFT      = 16
	FIXED_FLOAT_COEF = 1 << FIXED_SHIFT
)

/*! Fixed point math inevitably introduces rounding error to the DDA. The error is
 *  fixed every now and then by a separate fix value. The defines below set these.
 */
const (
	SLOPE_FIX_SHIFT = 8
	SLOPE_FIX_STEP  = 1 << SLOPE_FIX_SHIFT
	SLOPE_FIX_MASK  = SLOPE_FIX_STEP - 1
)