<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.virtualparadise.org/index.php?action=history&amp;feed=atom&amp;title=Vp_double</id>
	<title>Vp double - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.virtualparadise.org/index.php?action=history&amp;feed=atom&amp;title=Vp_double"/>
	<link rel="alternate" type="text/html" href="https://wiki.virtualparadise.org/index.php?title=Vp_double&amp;action=history"/>
	<updated>2026-05-04T21:09:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.virtualparadise.org/index.php?title=Vp_double&amp;diff=4302&amp;oldid=prev</id>
		<title>Sleepy E: Basic layout</title>
		<link rel="alternate" type="text/html" href="https://wiki.virtualparadise.org/index.php?title=Vp_double&amp;diff=4302&amp;oldid=prev"/>
		<updated>2016-12-14T20:29:12Z</updated>

		<summary type="html">&lt;p&gt;Basic layout&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{sdk method page|double|Return the value of a floating point attribute (with double-precision)&lt;br /&gt;
|paramex=attr&lt;br /&gt;
|parameters=&lt;br /&gt;
  {{sdk parameter row|vp_float_attribute_t|attr|Attribute to return value of (defined in VP.h)}}&lt;br /&gt;
|returns=&lt;br /&gt;
The value of the attribute.&lt;br /&gt;
|behavior=If an invalid identifier is passed for &amp;lt;i&amp;gt;attr&amp;lt;/i&amp;gt;, then 0 will be returned.&lt;br /&gt;
|caveats=There is no way to know if the call was unsuccessful, use {{sdk method|double_get}} when this is required.&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void handle_avatar_add(VPInstance sdk)&lt;br /&gt;
{&lt;br /&gt;
  double x, z;&lt;br /&gt;
&lt;br /&gt;
  x = vp_double(sdk, VP_AVATAR_X);&lt;br /&gt;
  z = vp_double(sdk, VP_AVATAR_Z);&lt;br /&gt;
&lt;br /&gt;
  // If an avatar appears at roughly 0X 0Z (at any height), then send a welcome message.&lt;br /&gt;
  if (x &amp;gt; -0.5 &amp;amp;&amp;amp; x &amp;lt; 0.5 &amp;amp;&amp;amp; y &amp;gt; -0.5 &amp;amp;&amp;amp; y &amp;lt; 0.5)&lt;br /&gt;
  {&lt;br /&gt;
    char msg[256];&lt;br /&gt;
&lt;br /&gt;
    sprintf(msg, &amp;quot;Welcome %s to the world!&amp;quot;, vp_string(sdk, VP_AVATAR_NAME));&lt;br /&gt;
    vp_say(sdk, msg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(int argc, const char* argv[])&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
  //...&lt;br /&gt;
&lt;br /&gt;
  vp_event_set(sdk, VP_EVENT_AVATAR_ADD, handle_avatar_add);&lt;br /&gt;
&lt;br /&gt;
  //...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|seealso=&lt;br /&gt;
* {{sdk method|double_get}}&lt;br /&gt;
* {{sdk method|double_set}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Sleepy E</name></author>
	</entry>
</feed>