Exemplo n.º 1
0
        private void CalculateCurrentPosition(long tick)
        {
            currentTick = tick;

            var currentAngle = (tick * rotationPerTick) + startingAngle;

            locAtCurrentTick = new FixedLocation(center, currentAngle, distance);
        }
Exemplo n.º 2
0
        public vector(Direction direction, Distance distance)
        {
            this.Direction = direction;
            this.Distance  = distance;

            var vectorLoc = new FixedLocation(FixedLocation.Zero, Direction, Distance);

            this.XOffset = vectorLoc.X;
            this.YOffset = vectorLoc.Y;
        }
Exemplo n.º 3
0
        public vector(long XOffset, long YOffset)
        {
            this.XOffset = XOffset;
            this.YOffset = YOffset;

            var vectorLoc = new FixedLocation(XOffset, YOffset);

            this.Direction = Direction.Calculate(FixedLocation.Zero, vectorLoc);
            this.Distance  = Distance.Calculate(FixedLocation.Zero, vectorLoc);
        }