プログラミングのお題スレ Part22 (863レス)
プログラミングのお題スレ Part22 http://mevius.5ch.net/test/read.cgi/tech/1691038333/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
403: デフォルトの名無しさん [sage] 2024/08/10(土) 08:54:23.54 ID:DYGkQoQe REM 座標計算.bat chcp 65001 ruby -x "%~f0" goto end #~ #!ruby #encoding: utf-8 Encoding.default_external='UTF-8' require "matrix" while 1 print "input start point > " #0,0 p1=$stdin.gets.split(",").map{|e| e.to_f} print "input end point > " #120,0 p2=$stdin.gets.split(",").map{|e| e.to_f} print "input length > " #50 l=$stdin.gets.to_f exit if l<=0 p1[1]=0 unless p1[1] p2[1]=0 unless p2[1] v1=Vector.elements(p1) v2=Vector.elements(p2) m=(v2-v1).r n=(m/l).to_i a=(0..n).map{|e| l*e} b=a.map{|e| v1+(v2-v1)*(e/(v2-v1).r)}.map{|e| e.to_a} b<<p2 p b.uniq end __END__ :end http://mevius.5ch.net/test/read.cgi/tech/1691038333/403
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.026s