GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2015-07-01 00:39:37

GameGoblin
GameGoblin
From: India
Registered: 2015-06-30
Posts: 8
Website

triangle_side_area()

Expand///triangle_side_area(side1,side2,side3)
//Returns the area of triangle that has sides side1, side2 and side3 - uses Heron's formula
///http://GMLscripts.com/license

var s = (argument[0] + argument[1] + argument[2])/2;

return (sqrt(s * (s-argument[0]) * (s-argument[1]) * (s-argument[2])));

Regards,
GameGoblin

Offline

#2 2015-07-01 01:03:02

xot
Administrator
Registered: 2007-08-18
Posts: 1,240

Re: triangle_side_area()

Thanks again. I edited your first post with the correctly version and have already added your scripts to the site.


Abusing forum power since 1986.

Offline

Board footer

Powered by FluxBB