SFML/bindings/ruby/sfml-system/doc/classes/SFML/Vector3.src/M000020.html

33 lines
1.4 KiB
HTML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>/ (SFML::Vector3)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre>/* */
static VALUE Vector3_Divide( VALUE self, VALUE aRightOperand )
{
VALUE rightVector = Vector3_ForceType( aRightOperand );
// Get values
VALUE leftX = rb_funcall( self, rb_intern( &quot;x&quot; ), 0 );
VALUE leftY = rb_funcall( self, rb_intern( &quot;y&quot; ), 0 );
VALUE leftZ = rb_funcall( self, rb_intern( &quot;z&quot; ), 0 );
VALUE rightX = rb_funcall( rightVector, rb_intern( &quot;x&quot; ), 0 );
VALUE rightY = rb_funcall( rightVector, rb_intern( &quot;y&quot; ), 0 );
VALUE rightZ = rb_funcall( rightVector, rb_intern( &quot;z&quot; ), 0 );
// Do calculation
VALUE newX = rb_funcall( leftX, rb_intern( &quot;/&quot; ), 1, rightX );
VALUE newY = rb_funcall( leftY, rb_intern( &quot;/&quot; ), 1, rightY );
VALUE newZ = rb_funcall( leftZ, rb_intern( &quot;/&quot; ), 1, rightZ );
return rb_funcall( globalVector3Class, rb_intern( &quot;new&quot; ), 2, newX, newY, newZ );
}</pre>
</body>
</html>