Page MenuHomeWildfire Games

Include the last endpoint in distributePointsOnCircularSegment
ClosedPublic

Authored by temple on Mar 30 2018, 9:01 PM.

Details

Summary

Include the first and last endpoint of an arc.

Test Plan

Be careful about dividing by zero.
Agree.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5716
Build 9601: Vulcan Build
Build 9600: arc lint + arc unit

Event Timeline

temple created this revision.Mar 30 2018, 9:01 PM
elexis added a subscriber: elexis.Mar 30 2018, 11:13 PM

Doing the rounding inside the function would ensure that we don't divide by something that invalidates the uniform distribution.
Can commit if you made sure it works as intended.

binaries/data/mods/public/maps/random/rmgen/math.js
53

Math.max

elexis accepted this revision.Mar 30 2018, 11:14 PM

Thanks for writing it.
(Didn't test.)

This revision is now accepted and ready to land.Mar 30 2018, 11:14 PM
temple updated this revision to Diff 6289.Mar 31 2018, 1:34 AM

round in the function; use max

elexis accepted this revision.Mar 31 2018, 2:39 AM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Mar 31 2018, 3:31 AM