Integer arithmetic and averages in haven.

Ask, answer and discuss any and all topics about the hows, whys, wheres and whens of playing Haven & Hearth.
Sitting_Bill
Posts: 503
Joined: Tue Mar 15, 2011 12:35 am

Integer arithmetic and averages in haven.

Post by Sitting_Bill »

Hi -

A simple question for those who know. When calculating the "average" quality, say if I'm making a kiln, does the game round to the nearest integer, or take the integer part?

i.e. if I build, say, a kiln, with 44 pieces of q35 clay and 1 piece of q34, will the kiln quality be q35 or q34?

I'm guessing this comes down to how quality is represented in the code, as integers or floats or whatever.
in game character: Gunnar of Hlidarendi
User avatar
Tonkyhonk
Posts: 4501
Joined: Fri Sep 10, 2010 6:43 am

Re: Integer arithmetic and averages in haven.

Post by Tonkyhonk »

Sitting_Bill wrote:i.e. if I build, say, a kiln, with 44 pieces of q35 clay and 1 piece of q34, will the kiln quality be q35 or q34?
iirc, its rounded down to q34.
User avatar
Potjeh
Posts: 11825
Joined: Fri May 29, 2009 4:03 pm

Re: Integer arithmetic and averages in haven.

Post by Potjeh »

Yup, rule of thumb is that q gets rounded down.
Image Bottleneck

Return to “How do I?”