记录一些常用的三角公式
2010-11-07 23:44
316 查看
// substitute mouseX, mouseY with the x, y point to rotate to
dx = mouseX - sprite.x;
dy = mouseY - sprite.y;
sprite.rotation = Math.atan2(dy, dx) * 180 / M
创建波形:
// assign value to x, y or other property of srite or movie clip,
// use as drawing coordinates, etc.
public function onEnterFrame(event:Event){
value = center + Math.sin(angle) * range;
angle += speed;
}
创建圆形:
// assign position to x and y of sprite or movie clip,
// use as drawing coordinates, etc.
public function onEnterFrame(event:Event){
xposition = centerX + Math.cos(angle) * radius
yposition = centerY + Math.sin(angle) * radius
angle += speed;
}
dx = mouseX - sprite.x;
dy = mouseY - sprite.y;
sprite.rotation = Math.atan2(dy, dx) * 180 / M
创建波形:
// assign value to x, y or other property of srite or movie clip,
// use as drawing coordinates, etc.
public function onEnterFrame(event:Event){
value = center + Math.sin(angle) * range;
angle += speed;
}
创建圆形:
// assign position to x and y of sprite or movie clip,
// use as drawing coordinates, etc.
public function onEnterFrame(event:Event){
xposition = centerX + Math.cos(angle) * radius
yposition = centerY + Math.sin(angle) * radius
angle += speed;
}
相关文章推荐
- 黑马程序员----JavaSE一些常用基础知识点记录-学习日记
- 记录一些常用的git命令
- 记录常用的一些小功能代码
- etcd 一些常用操作指令 记录
- 记录一些常用的JS属性和语句
- IOS字典的一些常用记录
- 记录一些常用的依赖包
- 论文中常用的一些矩阵求导公式和二阶范数公式
- 一些常用操作记录
- 一些常用到的库记录
- python 零散记录(四) 强调字典中的键值唯一性 字典的一些常用方法
- PHP的一些 有用但不常用的函数记录
- 使用git的一些常用命令记录
- 论文中常用的一些矩阵求导公式和二阶范数公式
- 常用到的一些js方法,记录一下
- 一些常用记录
- [标]ORACLE常用的一些语句记录
- android 记录一些和apk相关的常用命令
- 个人记录一些常用的知识点
- 记录TableView 常用的一些代码