Published in: ASP
URL: http://reusablecode.blogspot.com/2008/05/degrees-and-radians.html
Functions for converting between degrees and radians.
<% ' ASP Mathematics Library - Degree and Radian Conversion ' ' Copyright (c) 2008, reusablecode.blogspot.com; some rights reserved. ' ' This work is licensed under the Creative Commons Attribution License. To view ' a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or ' send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California ' 94305, USA. Const M_PI = 3.14159265358979323846 ' Converts the number in degrees to the radian equivalent. ' Requires constant M_PI function deg2rad(x) deg2rad = x * M_PI / 180 end function ' Converts the radian number to the equivalent number in degrees ' Requires constant M_PI function rad2deg(x) rad2deg = x * 180 / M_PI end function %>
You need to login to post a comment.
