23 lines
564 B
Text
23 lines
564 B
Text
|
||
export {
|
||
/* Vec3i
|
||
*/
|
||
let vec3i-add = λ{
|
||
{ ax:ℤ_2^64; ay:ℤ_2^64; az:ℤ_2^64; } : <Vec3 ℤ_2^64~machine.Int64>;
|
||
{ bx:ℤ_2^64; by:ℤ_2^64; bz:ℤ_2^64; } : <Vec3 ℤ_2^64~machine.Int64>;
|
||
} ↦ {
|
||
i+ az bz;
|
||
i+ ay by;
|
||
i+ ax bx;
|
||
};
|
||
|
||
let fmt-vec3i =
|
||
λ{ x:ℤ_2^64; y:ℤ_2^64; z:ℤ_2^64; } : <Vec3 ℤ_2^64~machine.Int64>
|
||
↦ {
|
||
'}';
|
||
fmt-int z; '='; 'z'; ' '; ';';
|
||
fmt-int y; '='; 'y'; ' '; ';';
|
||
fmt-int x; '='; 'x'; '{';
|
||
};
|
||
}
|
||
|