Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com Dumb Question (cos^-1)

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 04-10-2004, 10:10 PM PM User | #1 CraigC New to the CF scene   Join Date: Apr 2004 Posts: 4 Thanks: 0 Thanked 0 Times in 0 Posts Dumb Question (cos^-1) I'm just playing with Python 2.3, trying to get re-acquainted, and i've come across an extremely dumb problem, I don't know how to un-cosine (?) an angle on anything other than my calculator I'm just writing something to solve some simple geometry (yeah, I'm pretty bored...), and when writing something to solve the formula: cos (angle) = (a.b) / (|a|*|b|) I can't get the angle because I don't know any function in any language equivalent to what cos^-1 would do on my calculator Anybody know how to do it?
 04-11-2004, 08:10 AM PM User | #2 oracleguy Rockstar Coder   Join Date: Jun 2002 Location: USA Posts: 9,054 Thanks: 1 Thanked 322 Times in 318 Posts Well, I don't know python but I can help you out some. You are trying to do the inverse cosine. If there isn't a inverse cosine function in python, this might help you out some: x=cos(y) is the same as y=cos^-1(x) __________________ OracleGuy
 04-11-2004, 11:46 AM PM User | #3 shmoove Regular Coder   Join Date: Dec 2003 Posts: 367 Thanks: 0 Thanked 0 Times in 0 Posts The "official" name is arccosine. So look for functions like with names like acos(), or arccos() (look also for asin(), atan(), since sometimes the arc-functions aren't complete and only one of the variants exists - because if you know the cosine of an angle you can calculate it's sine and tangent and use one of the other functions to get the angle). Also keep in mind that the result is probably in radians and not degrees. shmoove
04-17-2004, 09:20 PM   PM User | #4
CraigC
New to the CF scene

Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Quote:
 Also keep in mind that the result is probably in radians and not degrees.
I thought it would be acos(), but I never even thought to check in the function ref whether the output was in degrees or radians :P

Thanks

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 05:22 AM.