Compare commits
No commits in common. "cc2addf7e213d401007dd035f06eba38da29f794" and "52494022f65ca73766a4991ff1d1bcc6cabbdad5" have entirely different histories.
cc2addf7e2
...
52494022f6
@ -30,7 +30,6 @@ func perlinLerp(t, a, b float64) float64 { return a + t*(b-a) }
|
||||
|
||||
func perlinAt2D(q [2]float64, rx, ry float64) float64 { return rx*q[0] + ry*q[1] }
|
||||
|
||||
// noise2d generates 2-dimensional noise. The result is in range [-sqrt(1/4),sqrt(1/4)].
|
||||
func (p *Perlin) noise1d(x float64) float64 {
|
||||
tx := x + perlinN
|
||||
bx0 := int(tx) & perlinBM
|
||||
@ -45,7 +44,6 @@ func (p *Perlin) noise1d(x float64) float64 {
|
||||
return perlinLerp(sx, u, v)
|
||||
}
|
||||
|
||||
// noise2d generates 2-dimensional noise. The result is in range [-sqrt(1/2),sqrt(1/2)].
|
||||
func (p *Perlin) noise2d(x, y float64) float64 {
|
||||
tx := x + perlinN
|
||||
bx0 := int(tx) & perlinBM
|
||||
|
@ -16,11 +16,6 @@ func Rect(x0, y0, x1, y1 int) Rectangle {
|
||||
return Rectangle{Point{x0, y0}, Point{x1, y1}}
|
||||
}
|
||||
|
||||
// RectRel is a shorthand function to create a rectangle specifying its width and height instead of a second coordinate.
|
||||
func RectRel(x, y, w, h int) Rectangle {
|
||||
return Rectangle{Point{x, y}, Point{x + w, y + h}}
|
||||
}
|
||||
|
||||
// Add translates rectangle r by point p.
|
||||
func (r Rectangle) Add(p Point) Rectangle {
|
||||
return Rectangle{
|
||||
|
@ -17,11 +17,6 @@ func RectF(x0, y0, x1, y1 float64) RectangleF {
|
||||
return RectangleF{PtF(x0, y0), PtF(x1, y1)}
|
||||
}
|
||||
|
||||
// RectRelF is a shorthand function to create a rectangle specifying its width and height instead of a second coordinate.
|
||||
func RectRelF(x, y, w, h float64) RectangleF {
|
||||
return RectangleF{PointF{x, y}, PointF{x + w, y + h}}
|
||||
}
|
||||
|
||||
// Add translates rectangle r by point p.
|
||||
func (r RectangleF) Add(p PointF) RectangleF {
|
||||
return RectangleF{
|
||||
|
@ -17,11 +17,6 @@ func RectF32(x0, y0, x1, y1 float32) RectangleF32 {
|
||||
return RectangleF32{PtF32(x0, y0), PtF32(x1, y1)}
|
||||
}
|
||||
|
||||
// RectRelF32 is a shorthand function to create a rectangle specifying its width and height instead of a second coordinate.
|
||||
func RectRelF32(x, y, w, h float32) RectangleF32 {
|
||||
return RectangleF32{PointF32{x, y}, PointF32{x + w, y + h}}
|
||||
}
|
||||
|
||||
// Add translates rectangle r by point p.
|
||||
func (r RectangleF32) Add(p PointF32) RectangleF32 {
|
||||
return RectangleF32{
|
||||
|
Loading…
Reference in New Issue
Block a user