### How does rounding work with minesweep range?

Posted:

**Mon Oct 13, 2014 5:03 pm**My webmines got swept by a ship 0.4 LY outside the webminefield, and another by a ship 0.2 LY outside the minefield.

I checked the host settings: webmine sweeprange = 0

I knew my minefield size, I just scanned my own mines.

There were no cloakers involved [not possible given the math of #beams and sweeping and stuff, it was 10 beams that did the sweeping].

So I was wondering, how does the HOST calculate if a ship is within minesweeping range?

I guess the HOST code does this:

A = Calculate distance ship to minefield centre

B = Calculate minefield radius

C = A-B

if C < sweeprange --> you can sweep

Now, where does it round? Does host round both A and B, or C?

And what does it use to round? ROUND or TRUNC?

Anybody ever tested this?

I checked the host settings: webmine sweeprange = 0

I knew my minefield size, I just scanned my own mines.

There were no cloakers involved [not possible given the math of #beams and sweeping and stuff, it was 10 beams that did the sweeping].

So I was wondering, how does the HOST calculate if a ship is within minesweeping range?

I guess the HOST code does this:

A = Calculate distance ship to minefield centre

B = Calculate minefield radius

C = A-B

if C < sweeprange --> you can sweep

Now, where does it round? Does host round both A and B, or C?

And what does it use to round? ROUND or TRUNC?

Anybody ever tested this?