Java type casting

35 views
Skip to first unread message

Dan Ingold

unread,
Nov 21, 2011, 6:15:12 PM11/21/11
to Brahms Forum
Is there a way to use a Java type cast in a Brahms expression? I have
a double that I can round to a long, "long dl = Math.round( dd );",
where dd is a double Unfortunately, Brahms demands an "int" argument
where I want to use this "long" value (as the argument to a
duration.)

There isn't a corresponding math function "int di =
Math.round( dd );". If casting were possible, I could either downcast
dl to an int and use it in the Brahms expression, or downcast dd to a
float and use the second form of Math.round().

Ron van Hoof

unread,
Nov 21, 2011, 7:06:27 PM11/21/11
to brahms...@googlegroups.com

Unfortunately not yet:( you would need a java activity to change the type.

Ron

Sent from my Droid

--
You received this message because you are subscribed to the Google Groups "Brahms Forum" group.
To post to this group, send email to brahms...@googlegroups.com.
To unsubscribe from this group, send email to brahms-forum...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/brahms-forum?hl=en.

Dan Ingold

unread,
Nov 21, 2011, 7:10:47 PM11/21/11
to Brahms Forum
Aha! Not exactly true... ;-) I found a posting by Maarten (9 Nov
2009), which identifies the doubleToInt activity in SystemGroup, which
does what I need. Actually, it shortcuts two of my steps into one.
Thanks for the quick reply, Ron!

--Dan

Maarten Sierhuis

unread,
Nov 21, 2011, 7:28:40 PM11/21/11
to brahms...@googlegroups.com
Dan,

Just a quick congrats/thanks for using the group to search for the answer ... I was going to reply and give you the answer, but you beat me to it :-)
Ron is right though ... doubleToInt( ) is a Java activity.


Doei ... MXS

rahul kumar

unread,
Apr 1, 2017, 12:47:36 AM4/1/17
to Brahms Forum
Check this one....Java Type Casting

Ling

Fabrice Razafindraibe

unread,
Jul 17, 2018, 3:49:57 AM7/17/18
to Brahms Forum


Hello,


How downloading the Brahms environnement ? 
Reply all
Reply to author
Forward
0 new messages