将坐标存储在pacal中的二维数组中 [英] storing coordinates in two-dimensional arrays in pacal

查看:116
本文介绍了将坐标存储在pacal中的二维数组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个坐标网格... x从0到100,y从0到200.

我想存储关于数组中每个点的信息...但是如果我声明一个数组[100,200],数组的高度为100,宽度为200,而网格则相反

所以在练习时他们要我创建一个数组[x,y ],对于坐标[x,y]

阵列是否应该从它应该的位置标题为90度?



帮助将不胜感激......我有点卡在这里!!

非常感谢你!

解决方案

<$有什么问题? c $ c> [100,200] 安排(或相反的安排)?

如果您以一致的方式访问项目,则每个安排都有效。毕竟空间是各向同性的,不是吗? : - )

Say that I have a grid of coordinates...x goes from 0 to 100 and y goes from 0 to 200.
I want to store info about each point in an array...however if I declare an array[100,200] the array eill be 100 in height and 200 in width,while the grid is the opposite
So at an exercise they want me to create an array [x,y], for coordinates [x,y]
Will the array be 'titled 90 degrees' from what it should be?

Help would be appreciated...im kind of stuck here!!
Thank you vety much !

解决方案

What is the problem of the [100,200] arrangment (or of the opposite one) ?
If you access the items in a consistent manner, every arrangment is valid. After all the space is isotropic, isn't it? :-)


这篇关于将坐标存储在pacal中的二维数组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆