// Função hex2rgb()
uint hex2rgb(string hexcolor) nothrow {
try {
uint value;
hexcolor.stripLeft("#").formattedRead!"%x"(value);
return value;
} catch(Throwable){return 0;}
}
// Função rgb2hex()
string rgb2hex(uint rgbcolor)
On Monday, 23 November 2020 at 17:39:09 UTC, Adam D. Ruppe wrote:
On Monday, 23 November 2020 at 17:34:27 UTC, visitor wrote:
Hi all,
I would like to know why in the code below, rgba.ptr[0] is
used instead of rgba[0] and allowing the method to be @safe
The .ptr[0] skips bounds checking.
On Monday, 23 November 2020 at 17:34:27 UTC, visitor wrote:
Hi all,
I would like to know why in the code below, rgba.ptr[0] is used
instead of rgba[0] and allowing the method to be @safe
The .ptr[0] skips bounds checking.
Since this example is static length with a constant index it
On Saturday, 21 November 2020 at 16:18:39 UTC, Alaindevos wrote:
It's not my related to a lack of knowledge of the d-language
but the complexity of the vibe.d framework itself.
What I understand are :
1: jade/diet .dt templates, inheritance,includes,markdown.
2: A simple form with POST method.
Hi all,
I would like to know why in the code below, rgba.ptr[0] is used
instead of rgba[0] and allowing the method to be @safe
float[4] rgba = 0;
ref inout(float) r() inout pure @trusted { pragma(inline, true);
return rgba.ptr[0]; }
why not :
ref inout(float) r() inout pure @safe {