--- a/UnitConverter.st Thu Apr 25 09:38:02 2013 +0200
+++ b/UnitConverter.st Thu Apr 25 15:09:39 2013 +0200
@@ -651,16 +651,16 @@
"/ working with squares or cubics ?
((sourceUnit endsWith:'^2') and:[destUnit endsWith:'^2']) ifTrue:[
- sU := (sourceUnit copyWithoutLast:2) asSymbolIfInterned.
- dU := (destUnit copyWithoutLast:2) asSymbolIfInterned.
+ sU := (sourceUnit copyButLast:2) asSymbolIfInterned.
+ dU := (destUnit copyButLast:2) asSymbolIfInterned.
(sU notNil and:[dU notNil]) ifTrue:[
^ (self convert:(howMany sqrt) from:sU to:dU) squared
].
^ self noConversionFrom:sourceUnit to:destUnit.
].
((sourceUnit endsWith:'^3') and:[destUnit endsWith:'^3']) ifTrue:[
- sU := (sourceUnit copyWithoutLast:2) asSymbolIfInterned.
- dU := (destUnit copyWithoutLast:2) asSymbolIfInterned.
+ sU := (sourceUnit copyButLast:2) asSymbolIfInterned.
+ dU := (destUnit copyButLast:2) asSymbolIfInterned.
(sU notNil and:[dU notNil]) ifTrue:[
^ (self convert:(howMany raisedTo:(1/3)) from:sU to:dU) raisedTo:3
].
@@ -1018,9 +1018,10 @@
!UnitConverter class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.39 2011-03-14 09:12:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.40 2013-04-25 13:09:39 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.39 2011-03-14 09:12:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/UnitConverter.st,v 1.40 2013-04-25 13:09:39 stefan Exp $'
! !
+