Calculate offset.
770100
def get_RaDecOffsets(ra1_deg, dec1_deg, ra2_deg, dec2_deg):
    """"""
    delta_ra_deg = ra1_deg - ra2_deg
    adj = math.cos(math.radians(dec2_deg))
    if delta_ra_deg > 180.0:
        delta_ra_deg = (delta_ra_deg - 360.0) * adj
    elif delta_ra_deg < -180.0:
        delta_ra_deg = (delta_ra_deg + 360.0) * adj
    else:
        delta_ra_deg *= adj

    delta_dec_deg = dec1_deg - dec2_deg
    return (delta_ra_deg, delta_dec_deg)
757737
def from_offset(self, value):
        '''
        
        '''
        if not self.params:
            self.params = dict({'from':value})
            return self
        self.params['from'] = value
        return self
422504
def xoffset(self, value):
        """"""
        if self._xoffset != value and \
           isinstance(value, (int, float, long)):
            self._xoffset = value
981067
def offset(value = nil, &block)
      chain { criteria.update_request_options from: block || Integer(value) }
    end
106387
def bottomAt(self, offset=0):
        
        return Location(self.getX() + (self.getW() / 2), self.getY() + self.getH() + offset)
877691
def round(self):
    """"""
    return Point(int(round(self.x)), int(round(self.y)))
252788
def horz_offset(self, offset):
        
        self.get_or_add_xMode().val = ST_LayoutMode.FACTOR
        self.get_or_add_x().val = offset
198245
def _offset_for(self, param):
        
        if param.has_parent():
            p = param._parent_._get_original(param)
            if p in self.parameters:
                return reduce(lambda a,b: a + b.size, self.parameters[:p._parent_index_], 0)
            return self._offset_for(param._parent_) + param._parent_._offset_for(param)
        return 0
70814
def _record_offset(self):
        """"""
        offset = self.blob_file.tell()
        self.event_offsets.append(offset)
571763
def offset(self, offset):
        """"""
        clone = self._clone()

        if isinstance(offset, int):
            clone._offset = offset

        return clone
1210985
def aboveAt(self, offset=0):
        
        return Location(self.getX() + (self.getW() / 2), self.getY() + offset)
1171828
protected function __offset($vtable_offset)
    {
        $vtable = $this->bb_pos - $this->bb->getInt($this->bb_pos);
        return $vtable_offset < $this->bb->getShort($vtable) ? $this->bb->getShort($vtable + $vtable_offset) : 0;
    }
662194
def get_offset(self, request):
        """"""
        try:
            return _positive_int(
                get_query_param(request, self.offset_query_param),
            )
        except (KeyError, ValueError):
            return 0
1325389
def set_offset(self, offset):
        

        if not isinstance(offset, int) or offset < 0:
            raise DaftException("Offset should be a positive integer.")

        self._offset = str(offset)
982657
function offset(a,b,va,vb) {
				return abOffset[a * N + b] + va * params[b].n + vb;
			}
406115
def seek(self, offset, whence=0):
        """"""
        if self._offset:
            if whence == 0:
                self._fh.seek(self._offset + offset, whence)
                return
            if whence == 2 and self._size > 0:
                self._fh.seek(self._offset + self._size + offset, 0)
                return
        self._fh.seek(offset, whence)
11742
def offset(self, offset):
        
        self.log(u"Applying offset to all fragments...")
        self.log([u"  Offset %.3f", offset])
        for fragment in self.fragments:
            fragment.interval.offset(
                offset=offset,
                allow_negative=False,
                min_begin_value=self.begin,
                max_end_value=self.end
            )
        self.log(u"Applying offset to all fragments... done")