Basic Programming [SOLVED]

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

Basic Programming [SOLVED]

Postby rp181 » Wed Aug 04, 2010 11:04 pm

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

Who is online

Users browsing this forum: No registered users and 4 guests