2009-06-25 07:16:22 -07:00
|
|
|
|
/*
|
|
|
|
|
* VibratoBPPair.cs
|
|
|
|
|
* Copyright (c) 2009 kbinani
|
|
|
|
|
*
|
|
|
|
|
* This file is part of Boare.Lib.Vsq.
|
|
|
|
|
*
|
|
|
|
|
* Boare.Lib.Vsq is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the BSD License.
|
|
|
|
|
*
|
|
|
|
|
* Boare.Lib.Vsq is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
*/
|
2010-03-16 20:14:08 -07:00
|
|
|
|
#if JAVA
|
|
|
|
|
package org.kbinani.vsq;
|
|
|
|
|
|
|
|
|
|
import java.io.*;
|
|
|
|
|
#else
|
2009-06-25 07:16:22 -07:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Boare.Lib.Vsq {
|
2010-03-16 20:14:08 -07:00
|
|
|
|
#endif
|
2009-06-25 07:16:22 -07:00
|
|
|
|
|
2010-03-16 20:14:08 -07:00
|
|
|
|
#if JAVA
|
|
|
|
|
public class VibratoBPPair implements Comparable<VibratoBPPair>, Serializable {
|
|
|
|
|
#else
|
2009-07-29 10:03:20 -07:00
|
|
|
|
[Serializable]
|
2009-06-25 07:16:22 -07:00
|
|
|
|
public class VibratoBPPair : IComparable<VibratoBPPair> {
|
2010-03-16 20:14:08 -07:00
|
|
|
|
#endif
|
2009-06-25 07:16:22 -07:00
|
|
|
|
public float X;
|
|
|
|
|
public int Y;
|
|
|
|
|
|
2009-07-29 10:03:20 -07:00
|
|
|
|
public VibratoBPPair() {
|
|
|
|
|
}
|
|
|
|
|
|
2009-06-25 07:16:22 -07:00
|
|
|
|
public VibratoBPPair( float x, int y ) {
|
|
|
|
|
X = x;
|
|
|
|
|
Y = y;
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-16 20:14:08 -07:00
|
|
|
|
public int compareTo( VibratoBPPair item ) {
|
2009-06-25 07:16:22 -07:00
|
|
|
|
float v = X - item.X;
|
|
|
|
|
if ( v > 0.0f ) {
|
|
|
|
|
return 1;
|
|
|
|
|
} else if ( v < 0.0f ) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2010-03-16 20:14:08 -07:00
|
|
|
|
|
|
|
|
|
#if !JAVA
|
|
|
|
|
public int CompareTo( VibratoBPPair item ) {
|
|
|
|
|
return compareTo( item );
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2009-06-25 07:16:22 -07:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-16 20:14:08 -07:00
|
|
|
|
#if !JAVA
|
2009-06-25 07:16:22 -07:00
|
|
|
|
}
|
2010-03-16 20:14:08 -07:00
|
|
|
|
#endif
|