Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
images_pages
/
SourceCode
/
CodeBase
:
FIMath_Ext.as
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/* * FusionCharts Free v2 * http://www.fusioncharts.com/free * * Copyright (c) 2009 InfoSoft Global (P) Ltd. * Dual licensed under the MIT (X11) and GNU GPL licenses. * http://www.fusioncharts.com/free/license * * MIT License: http://www.opensource.org/licenses/mit-license.php * GPL License: http://www.gnu.org/copyleft/gpl.html * * Date: 2009-08-21 */ //-------------------------------------------------------------------------------- /* Extended Math Utility function definitions This file contains extensions to the base Math Object. All the functions contained in this file can be used with any other Flash MX/+ movie for common procedures */ Math.calculatePoint = function(fromX, fromY, distance, angle) { //This function calculates the x and y co-ordinates of a point at an angular distance of "distance,angle" from the base point fromX, fromY //Convert the angle into radians angle = angle*(Math.PI/180); var xPos = fromX+(distance*Math.Cos(angle)); var yPos = fromY-(distance*Math.sin(angle)); return ({x:xPos, y:yPos}); };