numericalipb:ans4
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン | |||
numericalipb:ans4 [2025/07/09 23:49] – yuki | numericalipb:ans4 [2025/07/09 23:50] (現在) – [解答例] yuki | ||
---|---|---|---|
行 64: | 行 64: | ||
# もしくは x0 <- round( (x1 - cx) * ct + (y1 - cy) * st + cx) | # もしくは x0 <- round( (x1 - cx) * ct + (y1 - cy) * st + cx) | ||
y0 <- round(-x2 * st + y2 * ct) | y0 <- round(-x2 * st + y2 * ct) | ||
- | # もしくは y0 <- round(-(x1 - cx) * st + (y1 - cy) * st + cy) | + | # もしくは y0 <- round(-(x1 - cx) * st + (y1 - cy) * ct + cy) |
if (x0 < 1 || x0 > dim0[1] || y0 < 1 || y0 > dim0[2]) next | if (x0 < 1 || x0 > dim0[1] || y0 < 1 || y0 > dim0[2]) next | ||
g1[x1, y1, ,] <- g0[x0, y0, ,] | g1[x1, y1, ,] <- g0[x0, y0, ,] |
numericalipb/ans4.txt · 最終更新: 2025/07/09 23:50 by yuki