Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
Hi there,

Do Point3d or similar Objects include additional functions, like normalize() or getLength()?

I tried to extend the object, using the prototype syntax:
Point3d.prototype.getLength=new function(){
	return Math.sqrt(Math.pow(this.x)+Math.pow(this.y)+Math.pow(this.z));	
}

but it didn't work Frown What's wrong in the definition?

best regards,
frank
 
Posts: 48 | Registered: November 28, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Admin
Posted Hide Post
CXPPoint3d is a base type. Like a Number is. Unluckily, you cannot attach any additional functionalities / properties to it.

It’s a nice idea though, we will think about including it for future releases.

Regards
 
Posts: 1188 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community