Included libraries | Package variables | General documentation | Methods |
WebCvs | Raw content |
frame_and_offset | No description | Code |
frame_and_offset | description | prev | next | Top |
my ($pos,$strand,$phase) = @_; $strand ||= +1; $phase ||= 0; my $frame = $strand >= 0 ? ($pos - $phase - 1) % 3 : (1 - $pos - $phase) % 3; my $offset = -$phase % 3; $offset *= -1 if $strand < 0; return wantarray ? ($frame,$offset) : $frame; } 1;}