// ================================================== // 起動時に波のパラメータの初期値を訪ねて入力する関数 // ================================================== void inputParameters() { if ( confirm("波のパラメータを数値で入力しますか?") ) { amplitude = input("波の振幅=", amplitude); wavelength = input("波の波長=", wavelength); period = input("波の周期=", period); } }