Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Float from int divided by int

$
0
0

@ayruos wrote:

I'm trying to dynamically trying to generate a spacing value which depends on the window size and the number of elements in a vector.

This is what I'm doing:

spacing = ofGetWidth()/drawBuffer.size();

I have spacing declared as a float in my header file, but the results I keep getting is a int - how do I get the value of spacing as a float while dividing an int by an int?

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles