flagship-io / flagship-android

Flagship Android library for implementing campaigns in your native Android app.
Apache License 2.0
7 stars 2 forks source link

Assignment range issue #1

Closed guillaumejacquart closed 2 years ago

guillaumejacquart commented 3 years ago

Hash comparison with variation cumulative allocation traffic should be '<' instead of '<='. Example: v1 : 50% v2 : 50%

if hash % 100 == 50, it should be assigned to v2 (instead of v1 actually). [0;49[ contains actually 50 digits, the same as [50;100[

https://github.com/abtasty/flagship-android/blob/5f8454afee0f12519162069be279ea390ad8828a/src/main/java/com/abtasty/flagship/model/Campaign.kt#L145

raf-abtasty commented 2 years ago

It has been fixed in the v3.0.0. Thx