[PD] In search for Perlin Noise and seomthing to round numbers.
Claude Heiland-Allen
claudiusmaximus at goto10.org
Tue Oct 24 23:58:43 CEST 2006
Hi Adrian, list,
Adrian wrote:
> I'm sorry but i lack an english term for that:
>
> 3.14159265
> I
> [round]
> I
> 3.142
This works for non-negative numbers:
3.14159265
|
[* 1000]
|
[+ 0.5]
|
[int]
|
[/ 1000]
|
3.142
For negative numbers, it seems [int] truncates towards 0, which is a bit
weird.
Also try
[expr floor($f1,0)]
[expr ceil($f1,0)]
Which reminds me to ask, does anyone know why expr's floor and ceil
require two arguments, and would it make sense to allow floor and ceil
to work with a single argument only?
"
expr: syntax error: function 'floor' needs 2 arguments
error: expr: syntax error
... you might be able to track this down from the Find menu.
expr floor($f1)
... couldn't create
"
Claude
--
http://claudiusmaximus.goto10.org
More information about the Pd-list
mailing list