All pastes #499138 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-05-20 22:02 UTC
rendered paste body
menu * {
  .Picwin Clock { 
    window -opd +dL @clock 800 80 80 80
    var %x = 0 
    while (%x <= 15) { 
      drawreplace @clock $iif(%x < 10,0 $+ %x,%x) 15
      inc %x 
    }
    .timerrot 1 10 drawline @clock 04 1 40 40 $x(6,1,0) $y(6,1,0)
  }
}
on *:APPACTIVE: {
  if ($window(clock)) {
    if (!$appactive) {
      window -n2 @clock
    }
    else {
      window -r @clock
    }
  }
}
on *:KEYDOWN:@clock:*: {
  if ($keyval == 40) { window -s @clock $window(@clock).x $calc($window(@clock).y + 2) }
  elseif ($keyval == 39) { window -s @clock $calc($window(@clock).x + 2) $window(@clock).y }
  elseif ($keyval == 38) { window -s @clock $window(@clock).x $calc($window(@clock).y - 2) }
  elseif ($keyval == 37) { window -s @clock $calc($window(@clock).x - 2) $window(@clock).y }
}
on *:CLOSE:@clock: {
  /timerrot off
}
X`=Xcos(6) - Ysin(6) and Y`=Xsin(6) + Ycos(6)
alias x {
  return $calc(($2 * $cos($1)) - ($3 * $sin($1))) 
}
alias y {
  return $calc(($2 * $cos($1)) + ($3 * $sin($1))) 
}
_-={22:52:53}=-_ <Spitfire3292> here are the qudrants
_-={22:52:56}=-_ <Spitfire3292> quadrants
_-={22:52:58}=-_ <Spitfire3292> on a graph
_-={22:52:58}=-_ <Spitfire3292>       |
_-={22:52:59}=-_ <Spitfire3292>   1   | 4
_-={22:52:59}=-_ <Spitfire3292> ------|------
_-={22:52:59}=-_ <Spitfire3292>   2   | 3
_-={22:52:59}=-_ <Spitfire3292>       |
_-={22:53:04}=-_ <oliver> ah i get u
_-={22:53:06}=-_ <Spitfire3292> see how it goes coutner clock-wise
_-={22:53:10}=-_ <oliver> ok
_-={22:53:13}=-_ <oliver> why?
_-={22:53:15}=-_ <Spitfire3292> you start in quadrant one
_-={22:53:18}=-_ <iShock> I thought 4 was the top right =\
_-={22:53:23}=-_ <Spitfire3292> 90 degrees
_-={22:53:29}=-_ <Spitfire3292> is at the 12 hour mark
_-={22:53:31}=-_ <Spitfire3292> you see?