degrees

def setup
  background(220)
  x1 = degrees(PI)
  x2 = radians(x1)
  createDiv("#{x1}<br>#{x2}").position(0, 0)
end

p5.jsリファレンス(参考情報)

[p5.js] degrees

概要

ラジアン単位で表されている角度の値を度数単位の値に変換します。

書式

degrees(radians)

引数

引数名内容備考オプションデフォルト値
radians角度単位: ラジアン

戻値

度数単位の値

備考

関連