# I was spinning out with.

Pexsa: You’re welcome! Sorry, my discussion client doesn’t make it easy to find prior conversation

Stuchlik: Like with f – I was getting 1 + 0 * 3 which is obviously 0

Stuchlik: Brb, going to meriam webster to check what obviously means

Okie: I do no think that word means what you think it means

Stuchlik: OK, but even then – f isn’t on 1, it’s at 2, or 3 is it’s not zero indexed

Witry: Baxx: p is on 0, f is on 2, q is on 4

Stuchlik: Yeah, so why does the index give 1 for f ?

Stuchlik: Hope someone from #math is looking in on this.

Stuchlik: I was dividing the fX by cellSize which was 550/500 giving 1.~

Stuchlik: So that was 1 in that case, as it’s math.floor

Stuchlik: So then 1 + 0 * 3 = 1 obviously

Stuchlik: Which isn’t the right index for f

Okie: Maybe Math.floor is the problem?

Antillon: Baxx: are you sure it’s not?

Okie: Oops, didn’t scroll down

Falardeau: That sounds like the right index for x.

Lopau: Math.floor is what he wants to be using

Larowe: You drew it on 2, but it sounds like it should actulaly be on 1.

Stuchlik: Yeah I drew f in the wrong square

Stuchlik: I do this all the time, write the question down wrong and spend an hour trying to show how up = down

Kreiman: Baxx: here’s something for you to do. write a debug renderer. it should show on top of each entity the x and y values, some unique id for the entity if you dont have one then make it at construction, and the cell value

Luptak: Why does this give TypeError? randomProspect = prospectsgetRandomArbitrary1,2.Prospect;

Palino: It should also draw the cells out.

Blomme: TypeError: prospectsgetRandomArbitrary. is undefined

Stuchlik: Thanks for your code and time today though tcsc its much appreciated

Olsten: The code was pretty fun to write actually

Tofflemire: But i had never used it in production and i guess it had a bug

Counterman: The 2nd part was just other pieces i glued together mostly. the only new thing was the collision response code.

Caliendo: Other pieces from like, other one offs

Okie: Dagerik: Have you console logged the result of getRandomArbitrary1,2?

Eich: I should become a professional javascript one-off developer. if you need a silly little demo for your site, i could be your guy.

Stuchlik: Tcsc: debug renderer – so It will display on the actual canvas?

Cubias: If you look at the secont piece of code i posted, the jsfiddle, hit 1 to see it’s debug renderer

Papan: Knod: oh its not an integer

Okie: Alright, I may be on later to ask the same question. gl all

Gasperi: It doesn’t show position, but it shows id, cell values, and number of collisions that happened that frame

Busser: The last one is useless, but if you hit escape you can pause it, and then space will let you advance frame by frame, which makes it more useful.

Stuchlik: Tcsc: ‘1’ as in the numeric key? I’m not seeing anything from that here. Theres fps in the corner

Petronzio: Make sure the canvas has focus

Gerundo: How does adblock an extension remove the divs with ads in it before the page is loaded to the screen?

Stuchlik: Chrome – I’ll try firefox now

Yaftali: It works in both for me

Stuchlik: Chromes been a **** with YouTube fill screen this week actually, no idea if that’s somehow linked

Stuchlik: Tcsc: http://sendvid.com/jbn2gzbo

Pickerel: Thats real weird. there should also be 60 *****