public static float GetValue(Vector3 position, double[,,] array, double missingValue) { if (MathHelper.MissingCheck(position, array, missingValue)) return (float)missingValue; else return MathHelper.GetValue(position, array); }
public static bool CheckPosition(Vector3 position, double[,,] array, double missingValue) { int i = array.GetLength(0); int j = array.GetLength(1); int k = array.GetLength(2); if (position.X >= 0 && position.X < i && position.Y >= 0 && position.Y < j && position.Z >= 0 && position.Z < k && !MathHelper.MissingCheck(position, array, missingValue)) return true; else return false; }