social_learning.Agent.Step C# (CSharp) 메소드

Step() 공개 메소드

public Step ( double sensors ) : void
sensors double
리턴 void
        public void Step(double[] sensors)
        {
            var output = getRotationAndVelocity(sensors);

            Orientation += output[0];
            Orientation += 360;
            Orientation %= 360;

            Velocity += output[1];
            Velocity = Math.Min(MaxVelocity, Math.Max(0, Velocity));

            X += Velocity * (float)(Math.Cos(Orientation * Math.PI / 180.0));
            Y += Velocity * (float)(Math.Sin(Orientation * Math.PI / 180.0));
        }