@@ -204,7 +204,7 @@ unittest {
204
204
/**
205
205
Returns RGBA color from 0..1 from colors in range 0..255
206
206
*/
207
- vec4 rgbau2rgba (ubyte [4 ] colors) {
207
+ @safe pure nothrow vec4 rgbau2rgba(ubyte [4 ] colors) {
208
208
return vec4 (
209
209
cast (float )colors[0 ]/ 255.0 ,
210
210
cast (float )colors[1 ]/ 255.0 ,
@@ -216,7 +216,7 @@ vec4 rgbau2rgba(ubyte[4] colors) {
216
216
/**
217
217
Returns RGB color from 0..1 from colors in range 0..255
218
218
*/
219
- vec3 rgbu2rgb (ubyte [3 ] colors) {
219
+ @safe pure nothrow vec3 rgbu2rgb(ubyte [3 ] colors) {
220
220
return vec3 (
221
221
cast (float )colors[0 ]/ 255.0 ,
222
222
cast (float )colors[1 ]/ 255.0 ,
@@ -227,7 +227,7 @@ vec3 rgbu2rgb(ubyte[3] colors) {
227
227
/**
228
228
Returns RGBA color from 0..255 from colors in range 0..1
229
229
*/
230
- ubyte [4 ] rgba2rgbau (vec4 colors) {
230
+ @safe pure nothrow ubyte [4 ] rgba2rgbau(vec4 colors) {
231
231
ubyte [4 ] color;
232
232
static foreach (i; 0 .. 4 ) {
233
233
color[i] = cast (ubyte )(colors.vector[i]* 255.0 );
@@ -238,7 +238,7 @@ ubyte[4] rgba2rgbau(vec4 colors) {
238
238
/**
239
239
Returns RGB color from 0..255 from colors in range 0..1
240
240
*/
241
- ubyte [3 ] rgb2rgbu (vec3 colors) {
241
+ @safe pure nothrow ubyte [3 ] rgb2rgbu(vec3 colors) {
242
242
ubyte [3 ] color;
243
243
static foreach (i; 0 .. 3 ) {
244
244
color[i] = cast (ubyte )(colors.vector[i]* 255.0 );
0 commit comments