### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

### Messages - gameCloner

Pages: [1]
1
##### Feedback / Re: Issues with general purpose of SimpleVector Class
« on: February 17, 2013, 06:10:25 pm »
You ve been clear.
I still cannot code as I usually do.
but I can bear with, every other one can bear with that, so I.

Thanks and be well.

2
##### Feedback / Issues with general purpose of SimpleVector Class
« on: February 16, 2013, 03:18:59 pm »
Hi Helge and the jpct community.

first of all i would excuse me caus im no an expert poster, so i ask you to be kind in teaching me some.

im trying to code a ball game like tilt. im posting it soon if i can omn the forum.

i came across some code errors

Code: [Select]
SimpleVector copy = globalPos;

updateGlobalPos();  // or updateGlobalPos(globalPos)

this code affects copy as well. I understood i can not assign vectors as strings. To me it could be better to have a clone() and a equals() method in class.
example 2:
Code: [Select]
float maxKnot = 12.f;
public void interpolate(SimpleVector p1, SimpleVector p2){
SimpleVector delta = new SimpleVector(p1.x,p1.y,p1.z);
delta.sub(p2);
for ( int i = maxKnot ; i >0 ; i--){
SimpleVector temp= new SimpleVector(delta.x,delta.y,delta.z);
temp.scalarMul( i  / maxKnot);
}
}
to me that should look like this:
Code: [Select]
public void interpolate(SimpleVector p1, SimpleVector p2){
p1.sub(p2);
for ( int i = maxKnot ; i >0 ; i--){
SimpleVector delta = p1.clone().scalarMul( alfa ).add(p2);