assign value to *this like in c++?

lyan nothanks at 0.0
Thu Jun 20 11:31:19 UTC 2019


On Thursday, 20 June 2019 at 11:28:53 UTC, lyan wrote:
> Hi!
>
> I just started with D, read already a bit through the 
> documentation but I'm currently stuck here at porting my 
> vector3 class to D:
>
> inline void normalize() {
>   *this /= length();
> }
>
> How can I achieve that in D? Also: is there a way to overload 
> /=, */ operators?
>
> Thanks for the help!

The code is C++ btw. and I had a typo below, I meant /= and *= 
operators.


More information about the Digitalmars-d mailing list