用于选择单位的测量转换器
我看到了很多与宝石相关的测量转换,但我还没有找到能够选择最佳/最接近单位的宝石。
例如,
如果我给宝石提供尺寸,
9 inches + 6 inches
我想得到结果
1 foot, 3 inches
我见过的转换工具,我必须告诉转换器尝试转换为英尺,然后决定哪个是最合适的尺寸。
I'm seeing quite a few measurement conversion relating gems, but I haven't been able to find one that will select the best/closest unit.
For example
If I give the gem the measurement of
9 inches + 6 inches
I'm trying to get the result
1 foot, 3 inches
The conversion tools I've seen, I'd have to tell the convertor to try to convert to feet, and then decide which is the most appropriate measurement.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定你想要变得有多复杂,但对于你的例子,我这样做了:
输出为:
当然,我将其限制为英尺/英寸,但如果需要,您可以将其抽象出来(英寸和码、英尺和码等)
Not sure how complicated you wanted to get but for your example I did this:
With the output of:
Certainly I restricted it to feet/inches but you can abstract it out if necessary (inches & yards, feet & yards, etc.)