
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1659 4e206d99-4929-0410-ac5d-dfc041789085
33 lines
1.4 KiB
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( "x" ), 0 );
|
|
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
|
VALUE leftZ = rb_funcall( self, rb_intern( "z" ), 0 );
|
|
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
|
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
|
VALUE rightZ = rb_funcall( rightVector, rb_intern( "z" ), 0 );
|
|
|
|
// Do calculation
|
|
VALUE newX = rb_funcall( leftX, rb_intern( "/" ), 1, rightX );
|
|
VALUE newY = rb_funcall( leftY, rb_intern( "/" ), 1, rightY );
|
|
VALUE newZ = rb_funcall( leftZ, rb_intern( "/" ), 1, rightZ );
|
|
|
|
return rb_funcall( globalVector3Class, rb_intern( "new" ), 2, newX, newY, newZ );
|
|
}</pre>
|
|
</body>
|
|
</html> |