Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Welcome Guest | Log In | Register | Benefits
Channels ▼
RSS

JVM Languages

Extending JScript


Jan99: Extending JScript

Extending JScript

By Paul Butcher

Dr. Dobb's Journal January 1999

<B>(a)</B>
var unitx = new Vector(1, 0, 0);
var unity = new Vector(0, 1, 0);
var unitz = unitx.cross(unity);
messageBox(unitz.toString());
<B>(b)</B>
var vec = new Vector();
vec[0] = 0.2;
vec[2] = 0.3;
messageBox(vec.toString());

Example 5: Using the toString method.


Copyright © 1999, Dr. Dobb's Journal

Related Reading


More Insights