add methods to vs+/vs-/vs* on specialized-arrays so that they saturate as well
parent
63b89c65f9
commit
270fe50ba3
|
@ -10,8 +10,6 @@ FROM: alien.c-types => float ;
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: int
|
||||||
SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
|
SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
|
||||||
|
|
||||||
[ ulonglong ] [ ulonglong-array{ } element-type ] unit-test
|
|
||||||
|
|
||||||
[ t ] [ { 1 2 3 } >int-array int-array? ] unit-test
|
[ t ] [ { 1 2 3 } >int-array int-array? ] unit-test
|
||||||
|
|
||||||
[ t ] [ int-array{ 1 2 3 } int-array? ] unit-test
|
[ t ] [ int-array{ 1 2 3 } int-array? ] unit-test
|
||||||
|
|
|
@ -104,6 +104,10 @@ SYNTAX: A@ scan-object scan-object <direct-A> suffix! ;
|
||||||
|
|
||||||
INSTANCE: A specialized-array
|
INSTANCE: A specialized-array
|
||||||
|
|
||||||
|
M: A vs+ [ + T c-type-clamp ] 2map ;
|
||||||
|
M: A vs- [ - T c-type-clamp ] 2map ;
|
||||||
|
M: A vs* [ * T c-type-clamp ] 2map ;
|
||||||
|
|
||||||
;FUNCTOR
|
;FUNCTOR
|
||||||
|
|
||||||
GENERIC: (underlying-type) ( c-type -- c-type' )
|
GENERIC: (underlying-type) ( c-type -- c-type' )
|
||||||
|
|
Loading…
Reference in New Issue