|
|
I want to scale a vector.
What is the directive and syntax to do this?
Say, "squash" vector <-1, -1, 0> so it's <-1, 0.5, 0>
I'd like to operate on the whole vector, rather than do something like
<vector.x/2, vector.y, vector.z> "by hand"
I see the transforms.inc, but I don't know how to implement it, especially since
some of the macros are nested.
I'd also like to understand the "native" functions used there.
Post a reply to this message
|
|
|
|
Bald Eagle <cre### [at] netscapenet> wrote:
> I want to scale a vector.
> What is the directive and syntax to do this?
> Say, "squash" vector <-1, -1, 0> so it's <-1, 0.5, 0>
> I'd like to operate on the whole vector, rather than do something like
> <vector.x/2, vector.y, vector.z> "by hand"
You can multiply vectors in the same way as number, with '*'.
(It will simply multiply each vector component with each other.)
For example <1, 2, 3> * <1, 0.25, 1> = <1, 0.5, 3>
--
- Warp
Post a reply to this message
|
|