Help for this page

Select Code to Download


  1. or download this
    float fOrient = GetFacing( GetFirstPC() -90.0 );
    
  2. or download this
    float fOrient = GetFacing( GetFirstPC() ) - 90.0;
    
  3. or download this
    my %game = qw{E 0.0 N 90.0 W 180.0 S 270.0};
    
    ...
        my $real = (360 + 90 - $game{$_}) % 360;
        printf "game: %s = %5.1f; real: %5.1f\n" => $_, $game{$_}, $real;
    }
    
  4. or download this
    game: N =  90.0; real:   0.0
    game: E =   0.0; real:  90.0
    game: S = 270.0; real: 180.0
    game: W = 180.0; real: 270.0
    
  5. or download this
    float fOrient = IntToFloat(
        (360 + 90 - FloatToInt(GetFacing(GetFirstPC()))) % 360
    );