F
franky.backeljauw
Hello,
I have the following code:
<code>
class X {
___ sin();
}
X sin( X ) { return sin( y, x ); }
</code>
Then what should X::sin() do and return? Should it do the same, that is
sin( y, x ) and return y, or should it do sin( x, x ), that is compute the
sine of itself and store it in itself?
I am stuck in choosing either of these, so I would like to know your
opinion on this, and/or some examples of classes which have both these
functionalities.
Thanks in advance for any reply.
Regards,
Franky B.
I have the following code:
<code>
class X {
___ sin();
}
X sin( X ) { return sin( y, x ); }
</code>
Then what should X::sin() do and return? Should it do the same, that is
sin( y, x ) and return y, or should it do sin( x, x ), that is compute the
sine of itself and store it in itself?
I am stuck in choosing either of these, so I would like to know your
opinion on this, and/or some examples of classes which have both these
functionalities.
Thanks in advance for any reply.
Regards,
Franky B.