File: "point_direction.as"
package { public class point_direction { var radianAngle:Number; var degreeAngle:Number; public function point_direction(x1:Number, y1:Number, x2:Number, y2:Number) : Number { radianAngle = Math.atan2(y1 - y2, x1 - x2); degreeAngle = radianAngle * 180 / Math.PI(); return degreeAngle; } } }
Above is the file I'm having trouble fixing. I would like the file to return the final calculated angle in degrees when its done, but it throws this error.
Line 7, 1130: A constructor cannot specify a return type.