`
wangangie16
  • 浏览: 43353 次
  • 性别: Icon_minigender_2
  • 来自: 深圳
社区版块
存档分类
最新评论

as3系列判断点是否在矩形区域内

阅读更多

trace(point_in_dect(2,2,1,1,3,3));
//判断一个点是否在某个矩形(rectangular)区域内
function point_in_dect(point_x1,point_y1,dect_x1,dect_y1,dect_x2,dect_y2):Boolean{
var x_in:Boolean=((dect_x2point_x1)&&(point_x1>dect_x1));
var y_in:Boolean=((dect_y2point_y1)&&(point_y1>dect_y1));
if (x_in && y_in){
   return true;
}else{
   return false;
}
}
本文转自:http://www.5uflash.com/flashjiaocheng/Flash-as3-jiaocheng/1950.html
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics