Basic Programming [SOLVED]

New to XMOS and XCore? Get started here.
Post Reply
User avatar
rp181
Respected Member
Posts: 395
Joined: Tue May 18, 2010 12:25 am
Contact:

Basic Programming [SOLVED]

Post by rp181 »

If i have this method:

Code: Select all

void Vector_Scale(float vectorOut[3], float vectorIn[3], float scale2) {
	int c;
	for (c = 0; c < 3; c++) {
		vectorOut[c] = vectorIn[c] * scale2;
	}
}
How do I make it so whenever i call it, vectorOut will actually be written to what i give it? Do i use the "&" token? Where do i put it?

EDIT: Found out arrays are automatically by reference :D


Post Reply