Difference between revisions of "B2.CircleShape.new"

From GiderosMobile
m (Text replacement - "</source" to "</syntaxhighlight")
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
<languages />
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 +
'''Class:''' [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]]<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
Creates a new [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] instance and optionally set its center point and radius.
Creates a new `b2.CircleShape` instance and optionally set its center point and radius.<br />
+
 
If this function is called with more than 3 parameters, `b2.CircleShape` instance<br />
+
If this function is called with more than 3 parameters, [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] instance is created and its center point and radius are set. If this function is called without any paramaters, only [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] instance is created and you should set the center point and radius with [[b2.CircleShape:set]] function.
is created and its center point and radius are set. If this function is called without any <br />
+
<syntaxhighlight lang="lua">
paramaters, only `b2.CircleShape` instance is created and you should set the center<br />
 
point and radius with [[b2.CircleShape:set]] function.<br />
 
<br />
 
<source lang="lua">
 
 
(any), (any) = b2.CircleShape.new(centerx,centery,radius)
 
(any), (any) = b2.CircleShape.new(centerx,centery,radius)
</source>
+
</syntaxhighlight>
 +
 
 
=== Parameters ===
 
=== Parameters ===
 
'''centerx''': (number, optional) the x coordinate of the center <br/>
 
'''centerx''': (number, optional) the x coordinate of the center <br/>
 
'''centery''': (number, optional) the y coordinate of the center <br/>
 
'''centery''': (number, optional) the y coordinate of the center <br/>
 
'''radius''': (number, optional) the radius <br/>
 
'''radius''': (number, optional) the radius <br/>
 +
 
=== Return values ===
 
=== Return values ===
'''Returns''' (any) A new `b2.CircleShape` object.<br/>
+
'''Returns''' (any) A new [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] object.<br/>
'''Returns''' (any) A new `b2.CircleShape` object.<br/>
+
'''Returns''' (any) A new [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] object.<br/>
 +
 
 +
{{B2.CircleShape}}

Latest revision as of 17:19, 12 July 2023


Available since: Gideros 2011.6
Class: b2.CircleShape

Description

Creates a new b2.CircleShape instance and optionally set its center point and radius.

If this function is called with more than 3 parameters, b2.CircleShape instance is created and its center point and radius are set. If this function is called without any paramaters, only b2.CircleShape instance is created and you should set the center point and radius with b2.CircleShape:set function.

(any), (any) = b2.CircleShape.new(centerx,centery,radius)

Parameters

centerx: (number, optional) the x coordinate of the center
centery: (number, optional) the y coordinate of the center
radius: (number, optional) the radius

Return values

Returns (any) A new b2.CircleShape object.
Returns (any) A new b2.CircleShape object.




LiquidFun