On Friday, 6 December 2019 at 21:02:53 UTC, realhet wrote:
Here's my latest attempt on EXTENDING std.algorithm.max's
functionality with a max operation on a custom type.
The type is the GLSL vec2 type which does the max operation
component-wise.
The D std implementation uses the < operator,
On Friday, 6 December 2019 at 14:55:18 UTC, Ferhat Kurtulmuş
wrote:
On Friday, 6 December 2019 at 13:25:24 UTC, realhet wrote:
On Friday, 6 December 2019 at 13:04:57 UTC, Ferhat Kurtulmuş
wrote:
[...]
Thx for answering!
[...]
In d you can also use scoped imports:
On Friday, 6 December 2019 at 13:25:24 UTC, realhet wrote:
On Friday, 6 December 2019 at 13:04:57 UTC, Ferhat Kurtulmuş
wrote:
[...]
Thx for answering!
[...]
In d you can also use scoped imports:
https://dlang.org/spec/module.html#scoped_imports
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
On Friday, 6 December 2019 at 13:04:57 UTC, Ferhat Kurtulmuş
wrote:
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...}
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
}
module gl3n;
vec3 max(in vec3 a, in vec3 a) //another