例子:
1.
unitsize(1cm);
size(300);
path polygon(... pair[] K){
path p;
for(int i=0;i<K.length;++i){
p=p--K[i];
}
return p--cycle;
}
draw(polygon((0,0),(3,0),(3,3),(1.5,5),(0,3)),dashed);
shipout(bbox(2mm,invisible));
2.
unitsize(1cm);
size(300);
path polygon(... pair[] K){
guide p;
for(int i=0;i<K.length;++i){
p=p--K[i];
}
path g=p--cycle;
return g;
}
draw(polygon((0,0),(3,0),(3,3),(1.5,5),(0,3)),dashed);
shipout(bbox(2mm,invisible));
两者具有相同的输出,但我应该选择哪一个(例如关于processing times
)?