mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-08 16:21:43 +00:00
ch3: fix code path
This commit is contained in:
@@ -33,9 +33,8 @@ fmt.Println(cmplx.Sqrt(-1)) // "(0+1i)"
|
||||
|
||||
下面的程序使用complex128複數算法來生成一個Mandelbrot圖像。
|
||||
|
||||
<u><i>gopl.io/ch3/mandelbrot</i></u>
|
||||
```Go
|
||||
gopl.io/ch3/mandelbrot
|
||||
|
||||
// Mandelbrot emits a PNG image of the Mandelbrot fractal.
|
||||
package main
|
||||
|
||||
@@ -95,6 +94,3 @@ func mandelbrot(z complex128) color.Color {
|
||||
**練習 3.8:** 通過提高精度來生成更多級别的分形。使用四種不同精度類型的數字實現相同的分形:complex64、complex128、big.Float和big.Rat。(後面兩種類型在math/big包聲明。Float是有指定限精度的浮點數;Rat是無效精度的有理數。)它們間的性能和內存使用對比如何?當渲染圖可見時縮放的級别是多少?
|
||||
|
||||
**練習 3.9:** 編寫一個web服務器,用於給客戶端生成分形的圖像。運行客戶端用過HTTP參數參數指定x,y和zoom參數。
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user