Пример #1
0
        public void canMapValues()
        {
            var vi  = 0f;
            var v01 = PerMath.map01(vi);

            Assert.Equal(0.5f, v01, 4);
            var v11 = PerMath.map11(v01);

            Assert.Equal(0f, v11, 4);
        }
Пример #2
0
 public override float score()
 {
     // scale [0,1] sociability on sqrt curve
     return(Mathf.Sqrt(PerMath.map01(context.soul.traits.sociability)));
 }
Пример #3
0
 public override float score()
 {
     return(PerMath.map01(context.soul.traits.wary));
 }