// Path: StackAttackLibrary/src/com/wagoodman/stackattack/Identity.java
// public class Identity extends Object
// {
// 	private String id;
// 	private String groupId = null;
// 	
// 	public Identity() { id = BaseConverterUtil.Base62Random(); }
// 	
// 	public void setId(String newId) { id = newId; }
// 	public void setGroupId(String gid) { groupId = gid; }
// 	public void removeGroupMembership() {groupId = null; }
// 	
// 	public String getId() { return id; }
// 	public String getGroupId() { return groupId; }
// 	
// 	public Boolean isInGroup() { return groupId!=null; }
// 	
// 	public Integer tolkenizeId() { return BaseConverterUtil.tolkenizeStringToInt(id); }
// 	
// }


import com.wagoodman.stackattack.Identity;
				{
					if (!mTriggerStopOnNextPeriod)
					{
						// restart
						mTriggerDelay[dir] = 0;
						mStartTime = now;
					}
					else
					{
						// stop
						isTransforming = false;
						isCompleted = true;
					}
				}

			}
			
			return (long) Math.min( now - ( mStartTime + mTriggerDelay[dir] ) , mPeriod[dir] + mTriggerDelay[dir] );
			
		}
		
		
		
		
	}
	
	
	///////////////////////////////////////////////////////////////////////////////////
	// Continuous Transform
	
// Path: StackAttackLibrary/src/com/wagoodman/stackattack/Identity.java
// public class Identity extends Object
// {
// 	private String id;
// 	private String groupId = null;
// 	
// 	public Identity() { id = BaseConverterUtil.Base62Random(); }
// 	
// 	public void setId(String newId) { id = newId; }
// 	public void setGroupId(String gid) { groupId = gid; }
// 	public void removeGroupMembership() {groupId = null; }
// 	
// 	public String getId() { return id; }
// 	public String getGroupId() { return groupId; }
// 	
// 	public Boolean isInGroup() { return groupId!=null; }
// 	
// 	public Integer tolkenizeId() { return BaseConverterUtil.tolkenizeStringToInt(id); }
// 	
// }


// Path: StackAttackLibrary/src/com/wagoodman/stackattack/TransformState.java
import com.wagoodman.stackattack.Identity;

				{
					if (!mTriggerStopOnNextPeriod)
					{
						// restart
						mTriggerDelay[dir] = 0;
						mStartTime = now;
					}
					else
					{
						// stop
						isTransforming = false;
						isCompleted = true;
					}
				}

			}
			
			return (long) Math.min( now - ( mStartTime + mTriggerDelay[dir] ) , mPeriod[dir] + mTriggerDelay[dir] );
			
		}
		
		
		
		
	}
	
	
	///////////////////////////////////////////////////////////////////////////////////
	// Continuous Transform
	
	public double[]	mRate = {0,0,0};			// {x,y,z} or {r,p,y} per unit