Community Questions & Answers
Math in .tss
Doesn't look like Math is working in .tss files for Alloy development. Shouldn't I be able to do something like this: ~~~ '#value[platform=android]' : { top : 90, font : { fontFamily : 'Roboto-Thin', fontSize :...
What is the math for a rating system?
I'm trying to make a 5 star rate system... but I don't know how to do the maths to calculate and display the rate... eg: ~~~ var rateView = Ti.UI.createView(), max = 5, min = 1; // used in the flexMin and flexMax var numRates = 0 function rate(v)...
Simple math expressing not comupting correctly with parentheses
I have been having major problems with this simple expression: y = 4, b = 5, m = 0 y*(b+m*y) = 200 //should be 20!!! I found if I remove the parentheses from the formula, it works fine: y*b+m*y*y = 20 Can anyone explain why? I have some more...
What happened to Global Math?
Hi All, it seems in the docs only Global console, JSON and String are defined. I use Math quite a lot and I can't seem to find if has been deprecated. Nick
Why does json.parse make my decimals huge?
Previously we had only been returning whole numbers from our API but updated to do decimals now as well. The server is rounding to the nearest tenth but the app is showing unrounded long decimals and I can't figure out why. Here is an example: ~~~ var...
Formatting Decimals
I've been putting together an app that contains several calculators for medical equations, but one problem I've run into is that when I perform a calculation, the answer that gets spit out is in scientific format with about 15 decimal points (ex. 6.5...
math help - calculate rotation angle - code and images within
hey, im working on a titanium mobile application targeted for ipad. im using SDK Ti.Mobile 1.7.5 or 1.81 (i get the same results). im using a macbook pro (because i have to for iOS dev). anyway, the application has a "wheel" with...
Symbol for larger than or equal to
For a medical app I frequently need to enter for example "age >= 60yr" as an item to check (which goes in a tableview with switches). Is there a way to place the equal-sign BELOW the larger than-sign? (could be one - instead of 2 = as...
Fluid Layout / Fluid ImageView Width
Hi all, I'm having trouble making my Android app fit to different screen sizes. Although you've heard this question many times before, I'm yet to find a definitive answer by trawling through the Q&A or documentation. I was under the impression that...
Error in compiler using division operator
[SOLVED, SEE BELOW] Hi, this code produces an error in compiler: ~~~ var imgWidth = Titanium.Platform.displayCaps.platformWidth; var imgHeight = imgWidth / 3.75; //proporción ~~~ Seems like compiler does not likes the "/" sign. I can't...
Calculating icon position based on heading...
Hi guys, I've got a.. Math question, I guess. Anyway, what I'd like to achieve is this: a application which displays a map with the user's current location (I'm that far) and rotates according to the heading of the compass. Then, the hard part. I'd...
Picker and simple math
Hey there! I'm trying to do some simple math with a two column picker, as simple as "a+b=c"... like left column + right column = result... I just can't seem to get it to work, I even tried [this...
Bug? Alert window and variable math
Hi all, I think I found an odd bug in Titanium mobile, but I wanted to get a second opinion from people out there before filing this as a bug. Basically I've spent the last hour trying to figure out why my alert windows (which I use as debug) were not...
Showing 1-13 of 13