Mercurial > hg > octave-nkf
comparison scripts/java/org/octave/ClassHelper.java @ 17665:78e9bfdc544e
* scripts/java/org/octave/ClassHelper.java (castArgument): Handle conversion of float.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Tue, 15 Oct 2013 21:43:00 -0400 |
parents | 6e39fe7992d9 |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17664:f4b0430fa5fd | 17665:78e9bfdc544e |
---|---|
621 } | 621 } |
622 else if (expType.equals (Long.TYPE) || expType.equals (Long.class)) | 622 else if (expType.equals (Long.TYPE) || expType.equals (Long.class)) |
623 { | 623 { |
624 return new Long (((Number) obj).longValue ()); | 624 return new Long (((Number) obj).longValue ()); |
625 } | 625 } |
626 else if (expType.equals (Float.TYPE) || expType.equals (Float.class)) | |
627 { | |
628 return new Float (((Number) obj).floatValue ()); | |
629 } | |
626 } | 630 } |
627 else if (isBooleanClass (expType)) | 631 else if (isBooleanClass (expType)) |
628 { | 632 { |
629 return new Boolean (((Number) obj).intValue () != 0); | 633 return new Boolean (((Number) obj).intValue () != 0); |
630 } | 634 } |