Convert a byte ptr to a float array?

BlitzMax Forums/BlitzMax Programming/Convert a byte ptr to a float array?

JoshK(Posted 2007) [#1]
How do I do this?:

local cloud#[]

cloud=bank.buf()


EDIT

This works:

MemCopy cloud,bank.buf(),size


fredborg(Posted 2007) [#2]
You could use a float ptr instead and use:
Local cloud:float ptr = Float Ptr(bank.buf())

You can access it in the same way as an array.


Brucey(Posted 2007) [#3]
Yeah, I would use fredborg's method, as it saves an unnecessary memcopy.