对象标题与 int 中的值匹配的转换公式?
我有一个项目标题列表,它们都是整数(是的,标题是 0 到 120 int)值,但是当我阅读它们时,它们都是浮点数,所以在两者之间正在进行我不知道的转换(代码未打开,所以我无法自己检查,但我需要更新 xml,为此我必须知道如何转换它)。
- 我想在这里找到的是 我需要进行什么样的转换 为了摆脱浮动 a 匹配 int 作为示例 对象 A 和 B。
第一个示例是对象 A,它具有浮动标题 57,但具有整型标题 109。 第二个示例是对象 B,其浮动标题为 168,但整数标题为 26。
浮动标题为 0 到 360,整数为 0 到 120。
最初我考虑的是弧度,但有 2 个不一致之处首先是对象 A 是 57,int 为 109,所以我相信我无法对其应用转换公式,第二是如果我没有记错的话,弧度最大为 180。
我真的很想理解为什么它有代表学位的整数以及如何将其转换为这样的...
PS:顺便说一下,我在发布到这里之前首先在数学中发布了这个,但他们要求它在这里更合适。
使用更多样本进行更新:
F I
168 26
57 109
180 30
165 25
45 105
0 90
318 99
348 86
240 50
204 38
345 85
F 代表 Float I 代表 INT
I have a list of items heading that are all in INTEGER (yes the heading is 0 to 120 int) value but when I am reading them they are all in float, so in between there is a conversion being done that I am not aware of (code not open so I can't check it myself but I need to update the xml and for that i must know how to convert it).
- What I wanted to find out here is
what sort of conversion do I have to
do in order to get out of the float a
matching int for it as the examples
OBJECT A and B.
First example is OBJECT A which has the floating heading 57 but has the int heading 109.
Second example is OBJECT B which has the floating heading 168 but has the int heading 26.
The floating is 0 to 360 and the int is 0 to 120.
Initially i was think about radians but there are 2 incosistences first is that OBJECT A is 57 having the int 109 so I would not be able to apply a converting formula to it I belive, second is that if I am not mistaken radians is up to 180.
I am really intrigued to understand why it has that integer representing a degree and how it is being converted to such...
PS: By the way I posted this in mathematics first before posting here but they requested it would be more suitable here.
UPDATE WITH MORE SAMPLES:
F I
168 26
57 109
180 30
165 25
45 105
0 90
318 99
348 86
240 50
204 38
345 85
F for Float
I for INT
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的。您的坐标系旋转 90 度,120 匹配 360。
您的功能是:
绘图
所有点都可以,除了最后一个。
Ok. Your coordinates systems are rotated 90 degrees, and 120 matches 360.
Your function is:
A plot
All the points are OK, except the last one.