GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2015-07-01 01:19:15

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

point_in_circle()

Expand///point_in_circle(x,y,ox,oy,radius)
//Returns whether a point (x,y) is inside a circle or not
//
//x - x coordinate of the point to check, real
//y - y coordinate of the point to check, real
//ox - x coordinate of the center point of the circle, real
//oy - y coordinate of the center point of the circle, real
//radius - radius of the circle
//
///http://GMLscripts.com/license

return ((sqr(argument2-argument0) + sqr(argument3-argument1))<=sqr(argument4));

Offline

#2 2015-07-01 01:21:46

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

Re: point_in_circle()

Thanks but this is a script that already exists.

http://www.gmlscripts.com/script/point_in_circle

Also, please use the "Edit" feature to make corrections to your posts.


Abusing forum power since 1986.

Offline

Board footer

Powered by FluxBB