id.853867.mil

来自「一个内存数据库的源代码这是服务器端还有客户端」· MIL 代码 · 共 34 行

MIL
34
字号
## This test generates an array in the same way the RAM frontend would.# The array is filled with color values, to produce a pretty picture# in the SpatialView visualization.## it requires the color, array, and, mmath modules to be loaded:module("color","array","mmath");{var width := 40;var height := 30;var x_axis := grid(height,width,1,0);var y_axis := grid(1,height,width,0);var r := [abs]([int]([*]([sin]([/]([dbl](x_axis),dbl(width)/(2.0LL*M_PI))),255.0LL)));var g := [abs]([int]([*]([sin]([/]([dbl](y_axis),dbl(height)/(2.0LL*M_PI))),255.0LL)));var b := [abs]([int]([*]([sin]([/]([dbl]([+](x_axis,y_axis)),dbl(width+height)/(2.0LL*M_PI))),255.0LL)));var values := [rgb](r,g,b);# Note this should be 'table', not 'print', but at present monet doesnt# produce column types in the table output, hence we revert back to the# plain print funciton.print(x_axis,y_axis,values);}drop("color");drop("array");drop("mmath");

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?