area of arbitrary triangle

A forum for general discussion of the Python programming language.

area of arbitrary triangle

Postby gnasher69 » Fri Apr 18, 2014 11:59 am

hi all can you help with a maths question, cant figure out how to write the equation, area = (1/2 ab sin c) in python code
Last edited by stranac on Fri Apr 18, 2014 12:09 pm, edited 1 time in total.
Reason: First post lock.
Posts: 1
Joined: Fri Apr 18, 2014 11:55 am

Re: area of arbitrary triangle

Postby stranac » Fri Apr 18, 2014 12:12 pm

You need to use math.sin().
It takes an angle in radians, so if your angle is in degrees, you'll need to convert it using math.radians().
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
Posts: 1790
Joined: Thu Feb 07, 2013 3:42 pm

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 6 guests