PageSourceSearch

https://tomeight.com/_nuxt/ratio-fits-perfectly.iA6IRB-S.js

js tomeight.com collected 2026-10-04 13:30:35 UTC 3,853 bytes, 1 lines download raw bytes

1import{f as S,l as m,k as x,o as d,c as v,a as t,m as f,v as h,h as c,z as y,F as k,i as F,t as b,p as M,e as N,d as R,_ as T,q as U}from"./entry.3-HIeTSr.js";import{u as D}from"./index.zxNNnXJl.js";import{u as P}from"./tomeight.BpD2cz_8.js";import"./vue.f36acd1f.YLkSvQFl.js";const n=_=>(M("data-v-8e4f34e2"),_=_(),N(),_),z={class:"ratio-fits-perfectly-root container"},C=n(()=>t("h1",null,"比率ピッタリ計算機",-1)),E={class:"main-grid"},j=n(()=>t("div",null,null,-1)),q=n(()=>t("div",{class:"cth"},"X",-1)),A=n(()=>t("div",{class:"cth"},":",-1)),J=n(()=>t("div",{class:"cth"},"Y",-1)),L=n(()=>t("div",{class:"rth"},"目標比率",-1)),O=n(()=>t("div",null,":",-1)),W=n(()=>t("div",{class:"rth"},"値",-1)),$=n(()=>t("div",null,":",-1)),G={key:0,class:"rth"},H={key:1},K=n(()=>t("div",null,":",-1)),Q=n(()=>t("div",{class:"grid-horizontal-divider"},[t("hr",{class:"thin"})],-1)),Z=n(()=>t("div",{class:"rth"},"X:Y",-1)),tt=n(()=>t("div",null,"1",-1)),et=n(()=>t("div",null,":",-1)),nt=n(()=>t("div",{class:"rth"},"X:Y",-1)),st=n(()=>t("div",null,":",-1)),lt=n(()=>t("div",null,"1",-1)),ot=n(()=>t("section",{class:"about"},[t("p",null,"入力した比率にピッタリ合うように、入力した値に近い値を計算します。"),t("div",null,[R(" 例えば比率を16:9、値を1920:1200とした場合 "),t("ol",null,[t("li",null," 値の1920は16の120倍です。9の120倍は1080なので、答えの一つは1920:1080となります。 "),t("li",null," 値の1200は9で割り切れません。1200に最も近い1200以下の9の倍数は1197で、9の133倍です。16の133倍は2128なので、答えの一つは2128:1107となります。 "),t("li",null," 前項に続き、1200に最も近い1200以上の9の倍数は1206で、9の134倍です。16の134倍は2144なので、答えの一つは2144:1206となります。 ")])])],-1)),ut=S({__name:"RatioFitsPerfectly",setup(_){const i=m(16),u=m(9),l=m(1920),o=m(1200),g=(r,s)=>{const e=[Math.floor(r/s)];return e[0]===0?[1]:(r%s!==0&&e.push(Math.ceil(r/s)),e)},V=x(()=>{const r=e=>{const p=e.map(a=>[a*i.value,a*u.value]);return p.filter((a,B)=>{const X=p.findIndex(Y=>Y[0]===a[0]&&Y[1]===a[1]);return X===-1?!0:X==B})},s=[["解なし","解なし"]];if(typeof i.value!="number"||typeof u.value!="number")return s;if(l.value===""&&o.value==="")return[[i.value,u.value]];if(typeof l.value=="number"){const e=g(l.value,i.value);return typeof o.value=="number"?r(e.concat(g(o.value,u.value))):r(e)}return typeof o.value=="number"?r(g(o.value,u.value)):s}),I=x(()=>typeof l.value!="number"||typeof o.value!="number"?"解なし":o.value/l.value),w=x(()=>typeof l.value!="number"||typeof o.value!="number"?"解なし":l.value/o.value);return(r,s)=>(d(),v("div",z,[C,t("section",E,[j,q,A,J,L,t("div",null,[f(t("input",{type:"number",class:"input",min:"1",step:"1","onUpdate:modelValue":s[0]||(s[0]=e=>y(i)?i.value=e:null)},null,512),[[h,c(i)]])]),O,t("div",null,[f(t("input",{type:"number",class:"input",min:"1",step:"1","onUpdate:modelValue":s[1]||(s[1]=e=>y(u)?u.value=e:null)},null,512),[[h,c(u)]])]),W,t("div",null,[f(t("input",{type:"number",class:"input",min:"1",step:"1","onUpdate:modelValue":s[2]||(s[2]=e=>y(l)?l.value=e:null)},null,512),[[h,c(l)]])]),$,t("div",null,[f(t("input",{type:"number",class:"input",min:"1",step:"1","onUpdate:modelValue":s[3]||(s[3]=e=>y(o)?o.value=e:null)},null,512),[[h,c(o)]])]),(d(!0),v(k,null,F(c(V),([e,p],a)=>(d(),v(k,null,[a===0?(d(),v("div",G,"答え")):(d(),v("div",H)),t("div",null,b(e),1),K,t("div",null,b(p),1)],64))),256)),Q,Z,tt,et,t("div",null,b(c(I)),1),nt,t("div",null,b(c(w)),1),st,lt]),ot]))}}),it=T(ut,[["__scopeId","data-v-8e4f34e2"]]),_t=S({__name:"ratio-fits-perfectly",setup(_){return D({title:P().titlePage("ピッタリ比率計算機")}),(i,u)=>{const l=it;return d(),U(l,{class:"main"})}}});export{_t as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.