projects
/
pintos-anon
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
New file.
[pintos-anon]
/
doc
/
mlfqs1i
1
#! /usr/bin/perl
2
my ($px, $py);
3
while (<>) {
4
my ($ix, $iy) = /^(\d+) (\d+)$/ or die;
5
my ($x) = ($ix - 206) / (436 - 206) * (28 - 23) + 23;
6
my ($y) = ($iy - 126) / (287 - 126) * (60 - 0) + 0;
7
printf "%.2f %.2f\n", $x, $py if defined $py;
8
printf "%.2f %.2f\n", $x, $y;
9
($px, $py) = ($x, $y);
10
}